]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: cast ioctl values when printing them
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 4 Mar 2015 05:37:20 +0000 (06:37 +0100)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:32 +0000 (20:38 -0400)
ioctl values might be int or long, cast them to unsigned long for
consistent printing.  (They're long on FreeBSD, but were printed with
%d.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
pimd/pim_cmd.c

index 1eab5d05f74d3d21917961f531ddef7272b2b9ee..5abaab05f2caa11ffa58645785d2fbb97439ed18 100644 (file)
@@ -2031,8 +2031,8 @@ static void show_multicast_interfaces(struct vty *vty)
     if (ioctl(qpim_mroute_socket_fd, SIOCGETVIFCNT, &vreq)) {
       int e = errno;
       vty_out(vty,
-             "ioctl(SIOCGETVIFCNT=%d) failure for interface %s vif_index=%d: errno=%d: %s%s",
-             SIOCGETVIFCNT,
+             "ioctl(SIOCGETVIFCNT=%lu) failure for interface %s vif_index=%d: errno=%d: %s%s",
+             (unsigned long)SIOCGETVIFCNT,
              ifp->name,
              pim_ifp->mroute_vif_index,
              e,
@@ -2225,8 +2225,8 @@ static void show_mroute_count(struct vty *vty)
     if (ioctl(qpim_mroute_socket_fd, SIOCGETSGCNT, &sgreq)) {
       int e = errno;
       vty_out(vty,
-             "ioctl(SIOCGETSGCNT=%d) failure for (S,G)=(%s,%s): errno=%d: %s%s",
-             SIOCGETSGCNT,
+             "ioctl(SIOCGETSGCNT=%lu) failure for (S,G)=(%s,%s): errno=%d: %s%s",
+             (unsigned long)SIOCGETSGCNT,
              source_str,
              group_str,
              e,