Thu Aug 25 16:51:48 2011 UTC ()
fix non-literal format string


(christos)
diff -r1.3 -r1.4 src/dist/pdisk/io.c

cvs diff -r1.3 -r1.4 src/dist/pdisk/Attic/io.c (expand / switch to context diff)
--- src/dist/pdisk/Attic/io.c 2009/04/18 06:37:35 1.3
+++ src/dist/pdisk/Attic/io.c 2011/08/25 16:51:48 1.4
@@ -92,7 +92,6 @@
 int my_getch(void);
 void my_ungetch(int c);
 
-
 //
 // Routines
 //
@@ -150,7 +149,7 @@
     int		c;
 
     flush_to_newline(0);
-    printf(prompt);
+    printf("%s", prompt);
 
     for (;;) {
 	c = my_getch();
@@ -168,7 +167,7 @@
 	    return 0;
 	} else {
 	    flush_to_newline(0);
-	    printf(prompt);
+	    printf("%s", prompt);
 	}
     }
     return -1;
@@ -181,7 +180,7 @@
     int		c;
 
     if (promptBeforeGet) {
-	printf(prompt);
+	printf("%s", prompt);
     }	
     for (;;) {
 	c = my_getch();
@@ -191,7 +190,7 @@
 	} else if (c == ' ' || c == '\t') {
 	    // skip blanks and tabs
 	} else if (c == '\n') {
-	    printf(prompt);
+	    printf("%s", prompt);
 	} else {
 	    *command = c;
 	    return 1;
@@ -216,7 +215,7 @@
 	    // skip blanks and tabs
 	} else if (c == '\n') {
 	    if (default_value == kDefault) {
-		printf(prompt);
+		printf("%s", prompt);
 	    } else {
 		my_ungetch(c);
 		*number = default_value;
@@ -295,7 +294,7 @@
 	    // skip blanks and tabs
 	} else if (c == '\n') {
 	    if (reprompt) {
-		printf(prompt);
+		printf("%s", prompt);
 	    } else {
 		my_ungetch(c);
 		*string = NULL;