File: formatting-fixes.patch

package info (click to toggle)
cdtool 2.1.8-release-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 868 kB
  • sloc: ansic: 6,525; sh: 2,823; makefile: 143
file content (28 lines) | stat: -rw-r--r-- 887 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix formatting issues
Author: Stephen Kitt <skitt@debian.org>

size_t should be qualified with ā€˜z’. Increase label length to cover
all possible sizes.

--- a/cdown.c
+++ b/cdown.c
@@ -261,7 +261,7 @@
   va_end(args);
 
   if (len < 1 || len > sizeof(buffer)) {
-      fprintf(stderr, "%s len=%d in netprintf\n", (len > sizeof(buffer)) ?
+      fprintf(stderr, "%s len=%zd in netprintf\n", (len > sizeof(buffer)) ?
         "truncated message" : "empty message or error", len);
       return -1;
   }
--- a/cdtool2cddb.c
+++ b/cdtool2cddb.c
@@ -197,7 +197,7 @@
 	   report_submitter, crlf, crlf, b->id, crlf);
   fputstring (out, cddb_max_line, "DTITLE=", "%s / %s", b->artist, b->title);
   for (i=0; i<b->tracks; i++) {
-    char label[12];
+    char label[18];
     sprintf (label, "TTITLE%d=", i);
     fputstring (out, cddb_max_line, label, "%s", b->track[i]);
   }