summaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-12-04 21:15:46 +0000
committerJim Meyering <jim@meyering.net>1994-12-04 21:15:46 +0000
commit12042b2fa27dc803319d3bcc8f7ebd954250cbd8 (patch)
tree545c99499087d8df5cc389c48c7293388dd53ea8 /src/printf.c
parent06084cb7e8b51f8bd9e89c84723b7ce4e8af7541 (diff)
downloadcoreutils-12042b2fa27dc803319d3bcc8f7ebd954250cbd8.tar.xz
Use strr?chr instead of r?index.
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c6
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);