diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-21 12:43:45 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-21 12:43:45 +0000 |
commit | 931de892cc1c07ba3ce728cce3e4a64fe59c8444 (patch) | |
tree | d9a2eb0a78971f0556ea28538e1705b203e107ad /libbb | |
parent | a80b4a0fa74e7a19881790943d4f58de0411fa58 (diff) | |
download | busybox-w32-931de892cc1c07ba3ce728cce3e4a64fe59c8444.tar.gz busybox-w32-931de892cc1c07ba3ce728cce3e4a64fe59c8444.tar.bz2 busybox-w32-931de892cc1c07ba3ce728cce3e4a64fe59c8444.zip |
random shrinkage of statics, -60 bytes saved
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/dump.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libbb/dump.c b/libbb/dump.c index f078afc1c..6dbbd9f84 100644 --- a/libbb/dump.c +++ b/libbb/dump.c | |||
@@ -317,7 +317,8 @@ static void do_skip(const char *fname, int statok) | |||
317 | 317 | ||
318 | static int next(char **argv) | 318 | static int next(char **argv) |
319 | { | 319 | { |
320 | static int done; | 320 | static smallint done; |
321 | |||
321 | int statok; | 322 | int statok; |
322 | 323 | ||
323 | if (argv) { | 324 | if (argv) { |
@@ -332,10 +333,11 @@ static int next(char **argv) | |||
332 | ++_argv; | 333 | ++_argv; |
333 | continue; | 334 | continue; |
334 | } | 335 | } |
335 | statok = done = 1; | 336 | done = statok = 1; |
336 | } else { | 337 | } else { |
337 | if (done++) | 338 | if (done) |
338 | return 0; | 339 | return 0; |
340 | done = 1; | ||
339 | statok = 0; | 341 | statok = 0; |
340 | } | 342 | } |
341 | if (bb_dump_skip) | 343 | if (bb_dump_skip) |
@@ -350,8 +352,9 @@ static int next(char **argv) | |||
350 | 352 | ||
351 | static unsigned char *get(void) | 353 | static unsigned char *get(void) |
352 | { | 354 | { |
353 | static int ateof = 1; | 355 | static smallint ateof = 1; |
354 | static unsigned char *curp=NULL, *savp; /*DBU:[dave@cray.com]initialize curp */ | 356 | static unsigned char *curp = NULL, *savp; /*DBU:[dave@cray.com]initialize curp */ |
357 | |||
355 | int n; | 358 | int n; |
356 | int need, nread; | 359 | int need, nread; |
357 | unsigned char *tmpp; | 360 | unsigned char *tmpp; |
@@ -399,7 +402,8 @@ static unsigned char *get(void) | |||
399 | if (bb_dump_length != -1) { | 402 | if (bb_dump_length != -1) { |
400 | bb_dump_length -= n; | 403 | bb_dump_length -= n; |
401 | } | 404 | } |
402 | if (!(need -= n)) { | 405 | need -= n; |
406 | if (!need) { | ||
403 | if (bb_dump_vflag == ALL || bb_dump_vflag == FIRST | 407 | if (bb_dump_vflag == ALL || bb_dump_vflag == FIRST |
404 | || memcmp(curp, savp, bb_dump_blocksize)) { | 408 | || memcmp(curp, savp, bb_dump_blocksize)) { |
405 | if (bb_dump_vflag == DUP || bb_dump_vflag == FIRST) { | 409 | if (bb_dump_vflag == DUP || bb_dump_vflag == FIRST) { |