diff options
-rw-r--r-- | usr.bin/sort/init.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/sort/init.c b/usr.bin/sort/init.c index 861680e..f41b6de 100644 --- a/usr.bin/sort/init.c +++ b/usr.bin/sort/init.c @@ -135,7 +135,7 @@ setcolumn(pos, cur_fld, gflag) int tmp; col = cur_fld->icol.num ? (&(*cur_fld).tcol) : (&(*cur_fld).icol); pos += sscanf(pos, "%d", &(col->num)); - while (isdigit(*pos)) + while (isdigit((u_char)*pos)) pos++; if (col->num <= 0 && !(col->num == 0 && col == &(cur_fld->tcol))) errx(2, "field numbers must be positive"); @@ -144,7 +144,7 @@ setcolumn(pos, cur_fld, gflag) errx(2, "cannot indent end of line"); ++pos; pos += sscanf(pos, "%d", &(col->indent)); - while (isdigit(*pos)) + while (isdigit((u_char)*pos)) pos++; if (&cur_fld->icol == col) col->indent--; @@ -251,7 +251,7 @@ fixit(argc, argv) argv[i] = vpos; vpos += sprintf(vpos, "-k"); tpos += sscanf(tpos, "%d", &v); - while (isdigit(*tpos)) + while (isdigit((u_char)*tpos)) tpos++; vpos += sprintf(vpos, "%d", v+1); if (*tpos == '.') { @@ -263,16 +263,16 @@ fixit(argc, argv) *vpos++ = *tpos++; vpos += sprintf(vpos, ","); if (argv[i+1] && - argv[i+1][0] == '-' && isdigit(argv[i+1][1])) { + argv[i+1][0] == '-' && isdigit((u_char)argv[i+1][1])) { tpos = argv[i+1] + 1; tpos += sscanf(tpos, "%d", &w); - while (isdigit(*tpos)) + while (isdigit((u_char)*tpos)) tpos++; x = 0; if (*tpos == '.') { ++tpos; tpos += sscanf(tpos, "%d", &x); - while (isdigit(*tpos)) + while (isdigit((u_char)*tpos)) tpos++; } if (x) { |