1 |
commit: 9eba397314f86e231fa091e5203a80eccfacd6b8 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 21 00:51:23 2011 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 21 00:51:55 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/net-tools.git;a=commit;h=9eba3973 |
7 |
|
8 |
fix integer/pointer cast warnings |
9 |
|
10 |
On 64bit systems where sizeof(void *) != sizeof(int), we get a warning |
11 |
when trying to assign the return of atoi(). So insert a cast to avoid. |
12 |
|
13 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
14 |
|
15 |
--- |
16 |
ifconfig.c | 4 ++-- |
17 |
1 files changed, 2 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/ifconfig.c b/ifconfig.c |
20 |
index 952e705..44cea40 100644 |
21 |
--- a/ifconfig.c |
22 |
+++ b/ifconfig.c |
23 |
@@ -497,7 +497,7 @@ int main(int argc, char **argv) |
24 |
if (!strcmp(*spp, "keepalive")) { |
25 |
if (*++spp == NULL) |
26 |
usage(); |
27 |
- ifr.ifr_data = (caddr_t) atoi(*spp); |
28 |
+ ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp); |
29 |
if (ioctl(skfd, SIOCSKEEPALIVE, &ifr) < 0) { |
30 |
fprintf(stderr, "SIOCSKEEPALIVE: %s\n", strerror(errno)); |
31 |
goterr = 1; |
32 |
@@ -511,7 +511,7 @@ int main(int argc, char **argv) |
33 |
if (!strcmp(*spp, "outfill")) { |
34 |
if (*++spp == NULL) |
35 |
usage(); |
36 |
- ifr.ifr_data = (caddr_t) atoi(*spp); |
37 |
+ ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp); |
38 |
if (ioctl(skfd, SIOCSOUTFILL, &ifr) < 0) { |
39 |
fprintf(stderr, "SIOCSOUTFILL: %s\n", strerror(errno)); |
40 |
goterr = 1; |