summaryrefslogtreecommitdiff
path: root/coreutils/od.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/od.c')
-rw-r--r--coreutils/od.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/coreutils/od.c b/coreutils/od.c
index 6a138e8..b70cb85 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();
}