Commit 9eba3973 authored by Mike Frysinger's avatar Mike Frysinger

fix integer/pointer cast warnings

On 64bit systems where sizeof(void *) != sizeof(int), we get a warning
when trying to assign the return of atoi().  So insert a cast to avoid.
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent c5e8dfb6
......@@ -497,7 +497,7 @@ int main(int argc, char **argv)
if (!strcmp(*spp, "keepalive")) {
if (*++spp == NULL)
usage();
ifr.ifr_data = (caddr_t) atoi(*spp);
ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp);
if (ioctl(skfd, SIOCSKEEPALIVE, &ifr) < 0) {
fprintf(stderr, "SIOCSKEEPALIVE: %s\n", strerror(errno));
goterr = 1;
......@@ -511,7 +511,7 @@ int main(int argc, char **argv)
if (!strcmp(*spp, "outfill")) {
if (*++spp == NULL)
usage();
ifr.ifr_data = (caddr_t) atoi(*spp);
ifr.ifr_data = (caddr_t) (uintptr_t) atoi(*spp);
if (ioctl(skfd, SIOCSOUTFILL, &ifr) < 0) {
fprintf(stderr, "SIOCSOUTFILL: %s\n", strerror(errno));
goterr = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment