File: printf-literal-format

package info (click to toggle)
nast 0.2.0-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,788 kB
  • sloc: ansic: 7,516; sh: 2,768; makefile: 64
file content (17 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Use a string literal for the format argument in printf calls. 
Author: Jakub Wilk <jwilk@debian.org>
Bug: http://bugs.debian.org/614450
Forwarded: no
Last-Update: 2011-03-07

--- a/bcount.c
+++ b/bcount.c
@@ -153,7 +153,7 @@
 	     else icons++;
 
              sprintf (value, "%Ld", number);
-	     printf (value);
+	     printf ("%s", value);
 
 	     /* calculate space */
 	     if (strlen(value) < 6) printf ("\t\t");