Replace printfs with "%s" format strings with puts.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 13 Nov 2012 06:25:32 +0000 (17:25 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 13 Nov 2012 06:26:08 +0000 (17:26 +1100)
Thanks to Elan Ruusam√§e for the suggestion.

src/plugin_xmms/http.c
src/test_grabbag/cuesheet/main.c
src/test_grabbag/picture/main.c
src/test_seeking/main.c

index d8959f2..1e1ba6f 100644 (file)
@@ -488,7 +488,7 @@ static int http_connect (gchar *url_, gboolean head, guint64 offset)
                                if (offset && !head) {
                                        gchar *temp_dead = temp;
                                        temp = g_strdup_printf ("%sRange: %" PRIu64 "-\r\n", temp, offset);
-                                       fprintf (stderr, "%s", temp);
+                                       fputs (temp, stderr);
                                        g_free (temp_dead);
                                }
 
index f0cefd2..5e7fed0 100644 (file)
@@ -116,12 +116,12 @@ int main(int argc, char *argv[])
        const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ [ sample_rate ] cdda ]\n";
 
        if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
-               printf("%s", usage);
+               puts(usage);
                return 0;
        }
 
        if(argc < 3 || argc > 5) {
-               fprintf(stderr, "%s", usage);
+               fputs(usage, stderr);
                return 255;
        }
 
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
                        if(0 == strcmp(argv[4], "cdda"))
                                is_cdda = true;
                        else {
-                               fprintf(stderr, "%s", usage);
+                               fputs(usage, stderr);
                                return 255;
                        }
                }
index a1880ae..5c29e87 100644 (file)
@@ -211,12 +211,12 @@ int main(int argc, char *argv[])
        const char *usage = "usage: test_pictures path_prefix\n";
 
        if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
-               printf("%s", usage);
+               puts(usage);
                return 0;
        }
 
        if(argc != 2) {
-               fprintf(stderr, "%s", usage);
+               fputs(usage, stderr);
                return 255;
        }
 
index 46ea9c4..129cf0b 100644 (file)
@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
        static const char * const usage = "usage: test_seeking file.flac [#seeks] [#samples-in-file.flac] [file.raw]\n";
 
        if (argc < 2 || argc > 5) {
-               fprintf(stderr, "%s", usage);
+               fputs(usage, stderr);
                return 1;
        }