summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2016-02-01 18:55:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2016-02-01 18:55:01 +0000
commit788fa7d70995821b7b53b71b1490854046ed5679 (patch)
tree4d79e8c07734addc4bffa82155303a64757b2088
parentf35727ac23e8a14cf590226f2c9f42eefa969cf0 (diff)
Use printf("%s",prompt) rather than printf(prompt) just for paranoia's
sake.
-rw-r--r--sbin/pdisk/io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/pdisk/io.c b/sbin/pdisk/io.c
index 07b68d1ac16..2d8dfc308e6 100644
--- a/sbin/pdisk/io.c
+++ b/sbin/pdisk/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.30 2016/01/30 17:21:10 krw Exp $ */
+/* $OpenBSD: io.c,v 1.31 2016/02/01 18:55:00 krw Exp $ */
/*
* io.c - simple io and input parsing routines
@@ -98,7 +98,7 @@ get_okay(const char *prompt, int default_value)
int c;
flush_to_newline(0);
- printf(prompt);
+ printf("%s", prompt);
for (;;) {
c = my_getch();
@@ -116,7 +116,7 @@ get_okay(const char *prompt, int default_value)
return 0;
} else {
flush_to_newline(0);
- printf(prompt);
+ printf("%s", prompt);
}
}
return -1;
@@ -128,7 +128,7 @@ get_command(const char *prompt, int promptBeforeGet, int *command)
int c;
if (promptBeforeGet)
- printf(prompt);
+ printf("%s", prompt);
for (;;) {
c = my_getch();
@@ -138,7 +138,7 @@ get_command(const char *prompt, int promptBeforeGet, int *command)
} else if (c == ' ' || c == '\t') {
/* skip blanks and tabs */
} else if (c == '\n') {
- printf(prompt);
+ printf("%s", prompt);
} else {
*command = c;
return 1;
@@ -161,7 +161,7 @@ get_number_argument(const char *prompt, long *number)
} else if (c == ' ' || c == '\t') {
/* skip blanks and tabs */
} else if (c == '\n') {
- printf(prompt);
+ printf("%s", prompt);
} else if ('0' <= c && c <= '9') {
my_ungetch(c);
result = get_number(number);
@@ -211,7 +211,7 @@ get_dpistr_argument(const char *prompt)
} else if (c == ' ' || c == '\t') {
/* skip blanks and tabs */
} else if (c == '\n') {
- printf(prompt);
+ printf("%s", prompt);
} else if (c == '"' || c == '\'') {
return get_string(c);
} else if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') ||