summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath2002-11-28 09:22:14 +0000
committerGlenn L McGrath2002-11-28 09:22:14 +0000
commitd211214d42e1a2a8899510223674f0122b6c1ca7 (patch)
tree10f02af0bae108b5cca7732854cb37177ca73d8a
parentfedbfe40595c8f503b38382b4e882f93e7ec1e40 (diff)
downloadbusybox-d211214d42e1a2a8899510223674f0122b6c1ca7.zip
busybox-d211214d42e1a2a8899510223674f0122b6c1ca7.tar.gz
Use error_msg instead of printf(stderr
-rw-r--r--archival/gzip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 3e7a65a..da93157 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -354,8 +354,8 @@ static void clear_bufs(void)
static void write_error_msg(void)
{
- fprintf(stderr, "\n");
- perror("");
+ fputc('\n', stderr);
+ perror_msg("");
abort_gzip();
}
@@ -977,12 +977,11 @@ static void check_match(IPos start, IPos match, int length)
/* check that the match is indeed a match */
if (memcmp((char *) window + match,
(char *) window + start, length) != EQUAL) {
- fprintf(stderr,
- " start %d, match %d, length %d\n", start, match, length);
+ error_msg(" start %d, match %d, length %d", start, match, length);
error_msg("invalid match");
}
if (verbose > 1) {
- fprintf(stderr, "\\[%d,%d]", start - match, length);
+ error_msg("\\[%d,%d]", start - match, length);
do {
putc(window[start++], stderr);
} while (--length != 0);
@@ -1656,7 +1655,7 @@ static void set_file_type(void);
#else /* DEBUG */
# define send_code(c, tree) \
- { if (verbose>1) fprintf(stderr,"\ncd %3d ",(c)); \
+ { if (verbose>1) error_msg("\ncd %3d ",(c)); \
send_bits(tree[c].Code, tree[c].Len); }
#endif
@@ -2036,7 +2035,7 @@ static void build_tree(tree_desc * desc)
tree[n].Dad = tree[m].Dad = (ush) node;
#ifdef DUMP_BL_TREE
if (tree == bl_tree) {
- fprintf(stderr, "\nnode %d(%d), sons %d(%d) %d(%d)",
+ error_msg("\nnode %d(%d), sons %d(%d) %d(%d)",
node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
}
#endif