aboutsummaryrefslogtreecommitdiff
path: root/coreutils/od.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-01-30 19:48:23 +0000
committerEric Andersen <andersen@codepoet.org>2006-01-30 19:48:23 +0000
commit5e678873f9ff7c95d43b278feee547ce989b3b20 (patch)
tree6b0bab1e0d6df7f659352acc7dc844663c11634c /coreutils/od.c
parent2cdd4d56ffc3b467d5ffa76e3c4cd009dc311097 (diff)
downloadbusybox-w32-5e678873f9ff7c95d43b278feee547ce989b3b20.tar.gz
busybox-w32-5e678873f9ff7c95d43b278feee547ce989b3b20.tar.bz2
busybox-w32-5e678873f9ff7c95d43b278feee547ce989b3b20.zip
clean up yet more annoying signed/unsigned mismatches and fixup
yet more incorrect types
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 6a138e838..b70cb85e2 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -155,9 +155,9 @@ static const char * const add_strings[] = {
155 "4/4 \" %011o \" \"\\n\"", /* O */ 155 "4/4 \" %011o \" \"\\n\"", /* O */
156}; 156};
157 157
158static const signed char od_opts[] = "aBbcDdeFfHhIiLlOoXxv"; 158static const char od_opts[] = "aBbcDdeFfHhIiLlOoXxv";
159 159
160static const signed char od_o2si[] = { 160static const char od_o2si[] = {
161 0, 1, 2, 3, 5, 161 0, 1, 2, 3, 5,
162 4, 6, 6, 7, 8, 162 4, 6, 6, 7, 8,
163 9, 0xa, 0xb, 0xa, 0xa, 163 9, 0xa, 0xb, 0xa, 0xa,
@@ -168,14 +168,14 @@ int od_main(int argc, char **argv)
168{ 168{
169 int ch; 169 int ch;
170 int first = 1; 170 int first = 1;
171 signed char *p; 171 char *p;
172 bb_dump_vflag = FIRST; 172 bb_dump_vflag = FIRST;
173 bb_dump_length = -1; 173 bb_dump_length = -1;
174 174
175 while ((ch = getopt(argc, argv, od_opts)) > 0) { 175 while ((ch = getopt(argc, argv, od_opts)) > 0) {
176 if (ch == 'v') { 176 if (ch == 'v') {
177 bb_dump_vflag = ALL; 177 bb_dump_vflag = ALL;
178 } else if (((p = strchr(od_opts, ch)) != NULL) && (*p >= 0)) { 178 } else if (((p = strchr(od_opts, ch)) != NULL) && (*p != '\0')) {
179 if (first) { 179 if (first) {
180 first = 0; 180 first = 0;
181 bb_dump_add("\"%07.7_Ao\n\""); 181 bb_dump_add("\"%07.7_Ao\n\"");
@@ -183,7 +183,7 @@ int od_main(int argc, char **argv)
183 } else { 183 } else {
184 bb_dump_add("\" \""); 184 bb_dump_add("\" \"");
185 } 185 }
186 bb_dump_add(add_strings[od_o2si[(int)(p-od_opts)]]); 186 bb_dump_add(add_strings[(int)od_o2si[(p-od_opts)]]);
187 } else { /* P, p, s, w, or other unhandled */ 187 } else { /* P, p, s, w, or other unhandled */
188 bb_show_usage(); 188 bb_show_usage();
189 } 189 }