summaryrefslogtreecommitdiff
path: root/archival/lzop.c
diff options
context:
space:
mode:
authorDenys Vlasenko2015-10-28 15:33:19 +0100
committerDenys Vlasenko2015-10-28 15:33:19 +0100
commit4840325351911780a02f953f17b2eee919a36340 (patch)
tree45b4c9fa25be8683267ad2782b4f7cd5ed1e9828 /archival/lzop.c
parent82c2fad26c4134cc60eed9a3f05a9bbec70ab65b (diff)
downloadbusybox-4840325351911780a02f953f17b2eee919a36340.zip
busybox-4840325351911780a02f953f17b2eee919a36340.tar.gz
lzop: eliminate variable, use "int" as return type
Based on patch by Maxin B. John <maxin.john@intel.com> function old new delta pack_lzop 870 859 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/lzop.c')
-rw-r--r--archival/lzop.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/archival/lzop.c b/archival/lzop.c
index 73d11a7..a5fc019 100644
--- a/archival/lzop.c
+++ b/archival/lzop.c
@@ -640,7 +640,7 @@ static int lzo_get_method(header_t *h)
/**********************************************************************/
// compress a file
/**********************************************************************/
-static NOINLINE smallint lzo_compress(const header_t *h)
+static NOINLINE int lzo_compress(const header_t *h)
{
unsigned block_size = LZO_BLOCK_SIZE;
int r = 0; /* LZO_E_OK */
@@ -650,7 +650,6 @@ static NOINLINE smallint lzo_compress(const header_t *h)
uint32_t d_adler32 = ADLER32_INIT_VALUE;
uint32_t d_crc32 = CRC32_INIT_VALUE;
int l;
- smallint ok = 1;
uint8_t *wrk_mem = NULL;
if (h->method == M_LZO1X_1)
@@ -732,7 +731,7 @@ static NOINLINE smallint lzo_compress(const header_t *h)
free(wrk_mem);
free(b1);
free(b2);
- return ok;
+ return 1;
}
static FAST_FUNC void lzo_check(
@@ -753,7 +752,7 @@ static FAST_FUNC void lzo_check(
/**********************************************************************/
// decompress a file
/**********************************************************************/
-static NOINLINE smallint lzo_decompress(const header_t *h)
+static NOINLINE int lzo_decompress(const header_t *h)
{
unsigned block_size = LZO_BLOCK_SIZE;
int r;
@@ -761,7 +760,6 @@ static NOINLINE smallint lzo_decompress(const header_t *h)
uint32_t c_adler32 = ADLER32_INIT_VALUE;
uint32_t d_adler32 = ADLER32_INIT_VALUE;
uint32_t c_crc32 = CRC32_INIT_VALUE, d_crc32 = CRC32_INIT_VALUE;
- smallint ok = 1;
uint8_t *b1;
uint32_t mcs_block_size = MAX_COMPRESSED_SIZE(block_size);
uint8_t *b2 = NULL;
@@ -865,7 +863,7 @@ static NOINLINE smallint lzo_decompress(const header_t *h)
}
free(b2);
- return ok;
+ return 1;
}
/**********************************************************************/
@@ -1050,7 +1048,7 @@ static void lzo_set_method(header_t *h)
h->level = level;
}
-static smallint do_lzo_compress(void)
+static int do_lzo_compress(void)
{
header_t header;
@@ -1078,7 +1076,7 @@ static smallint do_lzo_compress(void)
/**********************************************************************/
// decompress
/**********************************************************************/
-static smallint do_lzo_decompress(void)
+static int do_lzo_decompress(void)
{
header_t header;