diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 12:38:24 +1000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 12:38:24 +1000 |
commit | e77e395efda0c0ab5bf9c951627c4fcf65c2e32e (patch) | |
tree | ac99825f254ed6009d573b4a10d3685c5042caaa /coreutils | |
parent | 2c95747817c0f7a498c74ff975afacea7a241da2 (diff) | |
parent | 3e47cfec90fbe358692b3b960f7fa2303e465c2f (diff) | |
download | busybox-w32-e77e395efda0c0ab5bf9c951627c4fcf65c2e32e.tar.gz busybox-w32-e77e395efda0c0ab5bf9c951627c4fcf65c2e32e.tar.bz2 busybox-w32-e77e395efda0c0ab5bf9c951627c4fcf65c2e32e.zip |
Merge branch 'origin/master' (early part)
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/head.c | 2 | ||||
-rw-r--r-- | coreutils/od_bloaty.c | 2 | ||||
-rw-r--r-- | coreutils/tail.c | 8 | ||||
-rw-r--r-- | coreutils/test.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/head.c b/coreutils/head.c index 75189eda8..cc2837411 100644 --- a/coreutils/head.c +++ b/coreutils/head.c | |||
@@ -27,7 +27,7 @@ static const struct suffix_mult head_suffixes[] = { | |||
27 | { "", 0 } | 27 | { "", 0 } |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n"; | 30 | #define header_fmt_str "\n==> %s <==\n" |
31 | 31 | ||
32 | int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 32 | int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
33 | int head_main(int argc, char **argv) | 33 | int head_main(int argc, char **argv) |
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index cb97ff8c5..4c6b64d5e 100644 --- a/coreutils/od_bloaty.c +++ b/coreutils/od_bloaty.c | |||
@@ -509,7 +509,7 @@ check_and_close(void) | |||
509 | } | 509 | } |
510 | 510 | ||
511 | if (ferror(stdout)) { | 511 | if (ferror(stdout)) { |
512 | bb_error_msg("write error"); | 512 | bb_error_msg(bb_msg_write_error); |
513 | ioerror = 1; | 513 | ioerror = 1; |
514 | } | 514 | } |
515 | } | 515 | } |
diff --git a/coreutils/tail.c b/coreutils/tail.c index 8fc22f562..6397702a0 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c | |||
@@ -66,7 +66,7 @@ static ssize_t tail_read(int fd, char *buf, size_t count) | |||
66 | return r; | 66 | return r; |
67 | } | 67 | } |
68 | 68 | ||
69 | static const char header_fmt[] ALIGN1 = "\n==> %s <==\n"; | 69 | #define header_fmt_str "\n==> %s <==\n" |
70 | 70 | ||
71 | static unsigned eat_num(const char *p) | 71 | static unsigned eat_num(const char *p) |
72 | { | 72 | { |
@@ -166,7 +166,7 @@ int tail_main(int argc, char **argv) | |||
166 | tailbuf = xmalloc(tailbufsize); | 166 | tailbuf = xmalloc(tailbufsize); |
167 | 167 | ||
168 | /* tail the files */ | 168 | /* tail the files */ |
169 | fmt = header_fmt + 1; /* skip header leading newline on first output */ | 169 | fmt = header_fmt_str + 1; /* skip header leading newline on first output */ |
170 | i = 0; | 170 | i = 0; |
171 | do { | 171 | do { |
172 | char *buf; | 172 | char *buf; |
@@ -181,7 +181,7 @@ int tail_main(int argc, char **argv) | |||
181 | 181 | ||
182 | if (nfiles > header_threshhold) { | 182 | if (nfiles > header_threshhold) { |
183 | tail_xprint_header(fmt, argv[i]); | 183 | tail_xprint_header(fmt, argv[i]); |
184 | fmt = header_fmt; | 184 | fmt = header_fmt_str; |
185 | } | 185 | } |
186 | 186 | ||
187 | if (!from_top) { | 187 | if (!from_top) { |
@@ -333,7 +333,7 @@ int tail_main(int argc, char **argv) | |||
333 | if (ENABLE_FEATURE_FANCY_TAIL && fd < 0) | 333 | if (ENABLE_FEATURE_FANCY_TAIL && fd < 0) |
334 | continue; | 334 | continue; |
335 | if (nfiles > header_threshhold) { | 335 | if (nfiles > header_threshhold) { |
336 | fmt = header_fmt; | 336 | fmt = header_fmt_str; |
337 | } | 337 | } |
338 | while ((nread = tail_read(fd, tailbuf, BUFSIZ)) > 0) { | 338 | while ((nread = tail_read(fd, tailbuf, BUFSIZ)) > 0) { |
339 | if (fmt) { | 339 | if (fmt) { |
diff --git a/coreutils/test.c b/coreutils/test.c index 3115ce6e7..0b9322316 100644 --- a/coreutils/test.c +++ b/coreutils/test.c | |||
@@ -393,7 +393,7 @@ static number_t getn(const char *s) | |||
393 | if (errno != 0) | 393 | if (errno != 0) |
394 | syntax(s, "out of range"); | 394 | syntax(s, "out of range"); |
395 | 395 | ||
396 | if (*(skip_whitespace(p))) | 396 | if (p == s || *(skip_whitespace(p)) != '\0') |
397 | syntax(s, "bad number"); | 397 | syntax(s, "bad number"); |
398 | 398 | ||
399 | return r; | 399 | return r; |