summaryrefslogtreecommitdiffstats
path: root/patches/totd-1.5/totd-1.5-sprintf.diff
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2010-02-03 00:56:57 +0100
committerRobert Schwebel <r.schwebel@pengutronix.de>2010-02-03 00:56:57 +0100
commit339396853ebac4db182eaf586abeb5d3ba8018fe (patch)
tree1f96fcfa2de38c428756d487b85c27dd50862b51 /patches/totd-1.5/totd-1.5-sprintf.diff
parent1426e0e21f374772bc50cc246935607b69f80288 (diff)
downloadptxdist-339396853ebac4db182eaf586abeb5d3ba8018fe.tar.gz
ptxdist-339396853ebac4db182eaf586abeb5d3ba8018fe.tar.xz
[totd] unbreak totd
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Diffstat (limited to 'patches/totd-1.5/totd-1.5-sprintf.diff')
-rw-r--r--patches/totd-1.5/totd-1.5-sprintf.diff39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/totd-1.5/totd-1.5-sprintf.diff b/patches/totd-1.5/totd-1.5-sprintf.diff
new file mode 100644
index 000000000..ed12ceb14
--- /dev/null
+++ b/patches/totd-1.5/totd-1.5-sprintf.diff
@@ -0,0 +1,39 @@
+Subject: [patch] fix data types in sprintf calls
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+
+ne_mesg.c:532: error: pointer targets in passing argument 1 of 'sprintf' differ in signedness
+ne_mesg.c:540: error: pointer targets in passing argument 1 of 'sprintf' differ in signedness
+ne_mesg.c:543: error: pointer targets in passing argument 1 of 'sprintf' differ in signedness
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ ne_mesg.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: totd-1.5/ne_mesg.c
+===================================================================
+--- totd-1.5.orig/ne_mesg.c
++++ totd-1.5/ne_mesg.c
+@@ -529,7 +529,7 @@ u_char *dname_decompress (u_char *buf, i
+ return NULL; /* buffer overrun */
+
+ wp = buf;
+- wp += sprintf(wp, "\\[x");
++ wp += sprintf((char*)wp, "\\[x");
+ for (i = 1; i < token_len-1; i++) {
+ u_char d1, d2;
+ uint b;
+@@ -537,10 +537,10 @@ u_char *dname_decompress (u_char *buf, i
+ b = (int) *(cp + 1 + i);
+ d1 = hex[(b >> 4) & 0x0f];
+ d2 = hex[b & 0x0f];
+- wp += sprintf(wp, "%c%c", d1, d2);
++ wp += sprintf((char*)wp, "%c%c", d1, d2);
+ }
+ bitlength = *(cp + 1) ? *(cp + 1) : 256;
+- wp += sprintf(wp, "/%u].", bitlength);
++ wp += sprintf((char*)wp, "/%u].", bitlength);
+
+ written_len += (wp - buf);
+ buf += written_len;