[Xfce4-commits] <xfce4-netload-plugin:master> Bug 7360: Fix two calls to snprintf()

Mike Massonnet noreply at xfce.org
Sat Jan 7 15:58:01 CET 2012


Updating branch refs/heads/master
         to 6751c3da2783726df35b99eff076e4c9c36902bd (commit)
       from e683d98fea5ebc970247d5622ca05490a2cc3249 (commit)

commit 6751c3da2783726df35b99eff076e4c9c36902bd
Author: Yves-Alexis Perez <corsac at debian.org>
Date:   Sat Jan 7 15:56:26 2012 +0100

    Bug 7360: Fix two calls to snprintf()

 panel-plugin/net.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/net.c b/panel-plugin/net.c
index 261e466..e5afd5c 100644
--- a/panel-plugin/net.c
+++ b/panel-plugin/net.c
@@ -194,7 +194,7 @@ int get_interface_up(netdata* data)
         return FALSE;
     }
     
-    snprintf(ifr.ifr_name, IF_NAMESIZE, data->ifdata.if_name);
+    snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", data->ifdata.if_name);
     if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) != 0)
     {
         PRINT_DBG("Error in ioctl(sockfd): %s", strerror(errno));
@@ -231,7 +231,7 @@ char* get_ip_address(netdata* data)
         return NULL;
     }
     
-    snprintf(ifr.ifr_name, IF_NAMESIZE, data->ifdata.if_name);
+    snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", data->ifdata.if_name);
     if (ioctl(sockfd, SIOCGIFADDR, &ifr) != 0)
     {
 	    if (errno != EADDRNOTAVAIL)


More information about the Xfce4-commits mailing list