diff options
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/printf.c b/src/printf.c index e437abe13..9e443dfd9 100644 --- a/src/printf.c +++ b/src/printf.c @@ -199,7 +199,7 @@ print_formatted (format, argc, argv) } break; } - if (index ("-+ #", *f)) + if (strchr ("-+ #", *f)) { ++f; ++direc_length; @@ -252,7 +252,7 @@ print_formatted (format, argc, argv) ++f; ++direc_length; } - if (!index ("diouxXfeEgGcs", *f)) + if (!strchr ("diouxXfeEgGcs", *f)) error (1, 0, "%%%c: invalid directive", *f); ++direc_length; if (argc > 0) @@ -310,7 +310,7 @@ print_esc (escstart) esc_value = esc_value * 8 + octtobin (*p); putchar (esc_value); } - else if (index ("\"\\abcfnrtv", *p)) + else if (strchr ("\"\\abcfnrtv", *p)) print_esc_char (*p++); else error (1, 0, "\\%c: invalid escape", *p); |