aboutsummaryrefslogtreecommitdiff
path: root/libbb/dump.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-21 12:43:45 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-21 12:43:45 +0000
commit931de892cc1c07ba3ce728cce3e4a64fe59c8444 (patch)
treed9a2eb0a78971f0556ea28538e1705b203e107ad /libbb/dump.c
parenta80b4a0fa74e7a19881790943d4f58de0411fa58 (diff)
downloadbusybox-931de892cc1c07ba3ce728cce3e4a64fe59c8444.tar.gz
random shrinkage of statics, -60 bytes saved
Diffstat (limited to 'libbb/dump.c')
-rw-r--r--libbb/dump.c16
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)
static int next(char **argv)
{
- static int done;
+ static smallint done;
+
int statok;
if (argv) {
@@ -332,10 +333,11 @@ static int next(char **argv)
++_argv;
continue;
}
- statok = done = 1;
+ done = statok = 1;
} else {
- if (done++)
+ if (done)
return 0;
+ done = 1;
statok = 0;
}
if (bb_dump_skip)
@@ -350,8 +352,9 @@ static int next(char **argv)
static unsigned char *get(void)
{
- static int ateof = 1;
- static unsigned char *curp=NULL, *savp; /*DBU:[dave@cray.com]initialize curp */
+ static smallint ateof = 1;
+ static unsigned char *curp = NULL, *savp; /*DBU:[dave@cray.com]initialize curp */
+
int n;
int need, nread;
unsigned char *tmpp;
@@ -399,7 +402,8 @@ static unsigned char *get(void)
if (bb_dump_length != -1) {
bb_dump_length -= n;
}
- if (!(need -= n)) {
+ need -= n;
+ if (!need) {
if (bb_dump_vflag == ALL || bb_dump_vflag == FIRST
|| memcmp(curp, savp, bb_dump_blocksize)) {
if (bb_dump_vflag == DUP || bb_dump_vflag == FIRST) {