aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-02 12:57:26 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-02 12:57:26 +0200
commitea8b252cb30c4b4463df43a5342af95931920f09 (patch)
treeb32f4cfd202c9b98cbb2a59bb5a629275e1b4119 /coreutils
parent8837c5dec402fd6782589c0a676bc7f90dea4061 (diff)
downloadbusybox-ea8b252cb30c4b4463df43a5342af95931920f09.tar.gz
*: better string sharing
text data bss dec hex filename 849427 441 7556 857424 d1550 busybox_old 849355 441 7556 857352 d1508 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/head.c2
-rw-r--r--coreutils/od_bloaty.c2
-rw-r--r--coreutils/tail.c8
3 files changed, 6 insertions, 6 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[] = {
{ "", 0 }
};
-static const char header_fmt_str[] ALIGN1 = "\n==> %s <==\n";
+#define header_fmt_str "\n==> %s <==\n"
int head_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int head_main(int argc, char **argv)
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index 6aba0f6bb..a9a45c8d3 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -502,7 +502,7 @@ check_and_close(void)
}
if (ferror(stdout)) {
- bb_error_msg("write error");
+ bb_error_msg(bb_msg_write_error);
ioerror = 1;
}
}
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)
return r;
}
-static const char header_fmt[] ALIGN1 = "\n==> %s <==\n";
+#define header_fmt_str "\n==> %s <==\n"
static unsigned eat_num(const char *p)
{
@@ -166,7 +166,7 @@ int tail_main(int argc, char **argv)
tailbuf = xmalloc(tailbufsize);
/* tail the files */
- fmt = header_fmt + 1; /* skip header leading newline on first output */
+ fmt = header_fmt_str + 1; /* skip header leading newline on first output */
i = 0;
do {
char *buf;
@@ -181,7 +181,7 @@ int tail_main(int argc, char **argv)
if (nfiles > header_threshhold) {
tail_xprint_header(fmt, argv[i]);
- fmt = header_fmt;
+ fmt = header_fmt_str;
}
if (!from_top) {
@@ -333,7 +333,7 @@ int tail_main(int argc, char **argv)
if (ENABLE_FEATURE_FANCY_TAIL && fd < 0)
continue;
if (nfiles > header_threshhold) {
- fmt = header_fmt;
+ fmt = header_fmt_str;
}
while ((nread = tail_read(fd, tailbuf, BUFSIZ)) > 0) {
if (fmt) {