From 5e678873f9ff7c95d43b278feee547ce989b3b20 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 30 Jan 2006 19:48:23 +0000 Subject: clean up yet more annoying signed/unsigned mismatches and fixup yet more incorrect types --- coreutils/od.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'coreutils/od.c') diff --git a/coreutils/od.c b/coreutils/od.c index 6a138e838..b70cb85e2 100644 --- a/coreutils/od.c +++ b/coreutils/od.c @@ -155,9 +155,9 @@ static const char * const add_strings[] = { "4/4 \" %011o \" \"\\n\"", /* O */ }; -static const signed char od_opts[] = "aBbcDdeFfHhIiLlOoXxv"; +static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv"; -static const signed char od_o2si[] = { +static const char od_o2si[] = { 0, 1, 2, 3, 5, 4, 6, 6, 7, 8, 9, 0xa, 0xb, 0xa, 0xa, @@ -168,14 +168,14 @@ int od_main(int argc, char **argv) { int ch; int first = 1; - signed char *p; + char *p; bb_dump_vflag = FIRST; bb_dump_length = -1; while ((ch = getopt(argc, argv, od_opts)) > 0) { if (ch == 'v') { bb_dump_vflag = ALL; - } else if (((p = strchr(od_opts, ch)) != NULL) && (*p >= 0)) { + } else if (((p = strchr(od_opts, ch)) != NULL) && (*p != '\0')) { if (first) { first = 0; bb_dump_add("\"%07.7_Ao\n\""); @@ -183,7 +183,7 @@ int od_main(int argc, char **argv) } else { bb_dump_add("\" \""); } - bb_dump_add(add_strings[od_o2si[(int)(p-od_opts)]]); + bb_dump_add(add_strings[(int)od_o2si[(p-od_opts)]]); } else { /* P, p, s, w, or other unhandled */ bb_show_usage(); } -- cgit v1.2.3