summaryrefslogtreecommitdiff
path: root/net-mgmt/sendip/files/patch-ipv4.c
blob: 01c260b1e5d56b692d798d65a0da5460fd9d8ecb (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- ipv4.c.orig	2007-11-09 20:01:39.000000000 +0100
+++ ipv4.c	2007-11-09 20:02:11.000000000 +0100
@@ -209,8 +209,8 @@
 				fprintf(stderr,"Out of memory!\n");
 				return FALSE;
 			}
-			sprintf(data,"0x%s",arg);
-			len = compact_string(data);
+			sprintf((char *)data,"0x%s",arg);
+			len = compact_string((char *)data);
 			cp=(*data&0x80)>>7;
 			cls=(*data&0x60)>>5;
 			num=(*data&0x1F);
@@ -237,7 +237,7 @@
 				free(data);
 				return FALSE;
 			} else {
-				addoption(0,0,7,len+2,data,pack);
+				addoption(0,0,7,len+2,(uint8_t *)data,pack);
 				free(data);
 			}
 		} else if(!strcmp(opt+2, "ts")) {
@@ -352,7 +352,7 @@
 				data_in = next;
 			}
 
-			addoption(0,2,4,data_out-data+2,data,pack);
+			addoption(0,2,4,data_out-data+2,(uint8_t *)data,pack);
 			free(data);
 			/* End of timestamp parsing */
 
@@ -377,7 +377,7 @@
 				free(data);
 				return FALSE;
 			} else {
-				addoption(1,0,3,len+2,data,pack);
+				addoption(1,0,3,len+2,(unsigned char *)data,pack);
 				free(data);
 			}
 		} else if(!strcmp(opt+2, "sid")) {
@@ -399,7 +399,7 @@
 				free(data);
 				return FALSE;
 			} else {
-				addoption(1,0,9,len+2,data,pack);
+				addoption(1,0,9,len+2,(uint8_t *)data,pack);
 				free(data);
 			}
 		} else {