diff --git a/iputils-ss021109-ifenslave-strncpy.diff b/iputils-ss021109-ifenslave-strncpy.diff new file mode 100644 index 0000000..86bfeb0 --- /dev/null +++ b/iputils-ss021109-ifenslave-strncpy.diff @@ -0,0 +1,56 @@ +--- ifenslave.c 2008-10-06 10:36:26.000000000 +0200 ++++ ifenslave.c 2008-10-06 10:38:24.000000000 +0200 +@@ -515,7 +515,7 @@ + spp++; + } + +- if (strncpy(if_ipaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0 ++ if (strncpy(if_ipaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0 + || ioctl(skfd, SIOCSIFADDR, &if_ipaddr) < 0) { + fprintf(stderr, + "Something broke setting the slave's address: %s.\n", +@@ -528,7 +528,7 @@ + } + } + +- if (strncpy(if_mtu.ifr_name, slave_ifname, IFNAMSIZ) <= 0 ++ if (strncpy(if_mtu.ifr_name, slave_ifname, IFNAMSIZ) == 0 + || ioctl(skfd, SIOCSIFMTU, &if_mtu) < 0) { + fprintf(stderr, "Something broke setting the slave MTU: %s.\n", + strerror(errno)); +@@ -537,7 +537,7 @@ + printf("Set the slave's (%s) MTU to %d.\n", slave_ifname, if_mtu.ifr_mtu); + } + +- if (strncpy(if_dstaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0 ++ if (strncpy(if_dstaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0 + || ioctl(skfd, SIOCSIFDSTADDR, &if_dstaddr) < 0) { + fprintf(stderr, "Error setting the slave (%s) with SIOCSIFDSTADDR: %s.\n", + slave_ifname, strerror(errno)); +@@ -549,7 +549,7 @@ + } + } + +- if (strncpy(if_brdaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0 ++ if (strncpy(if_brdaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0 + || ioctl(skfd, SIOCSIFBRDADDR, &if_brdaddr) < 0) { + fprintf(stderr, + "Something broke setting the slave (%s) broadcast address: %s.\n", +@@ -562,7 +562,7 @@ + } + } + +- if (strncpy(if_netmask.ifr_name, slave_ifname, IFNAMSIZ) <= 0 ++ if (strncpy(if_netmask.ifr_name, slave_ifname, IFNAMSIZ) == 0 + || ioctl(skfd, SIOCSIFNETMASK, &if_netmask) < 0) { + fprintf(stderr, + "Something broke setting the slave (%s) netmask: %s.\n", +@@ -582,7 +582,7 @@ + */ + ifr2.ifr_flags |= IFF_UP; + if ((ifr2.ifr_flags &= ~(IFF_SLAVE | IFF_MASTER)) == 0 +- || strncpy(ifr2.ifr_name, slave_ifname, IFNAMSIZ) <= 0 ++ || strncpy(ifr2.ifr_name, slave_ifname, IFNAMSIZ) == 0 + || ioctl(skfd, SIOCSIFFLAGS, &ifr2) < 0) { + fprintf(stderr, + "Something broke setting the slave (%s) flags: %s.\n", diff --git a/iputils.changes b/iputils.changes index c9ce8d6..84ab8c2 100644 --- a/iputils.changes +++ b/iputils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 6 10:47:49 CEST 2008 - ms@suse.de + +- fixed compiler warning in ifenslave.c: + *ordered comparison of pointer with integer zero (bnc #431910) + ------------------------------------------------------------------- Thu Sep 4 14:40:01 CEST 2008 - ms@suse.de diff --git a/iputils.spec b/iputils.spec index 2f74ef4..6b79212 100644 --- a/iputils.spec +++ b/iputils.spec @@ -21,7 +21,7 @@ Name: iputils Summary: IPv4and IPv6 Networking Utilities Version: ss021109 -Release: 285 +Release: 292 License: BSD 3-Clause; GPL v2 or later Group: Productivity/Networking/Other Provides: nkitb @@ -47,6 +47,7 @@ Patch15: %name-%version-ping_common.dif Patch16: %name-ss021109-traceroute6-ttab.diff Patch17: %name-%version-open_max.diff Patch18: %name-%version-ping-interrupt.diff +Patch19: %name-%version-ifenslave-strncpy.diff Prefix: %_prefix BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -81,6 +82,7 @@ Authors: %patch16 %patch17 -p1 %patch18 +%patch19 mkdir linux touch linux/autoconf.h @@ -127,6 +129,9 @@ rm -rf $RPM_BUILD_ROOT %attr(644,root,root) %_mandir/man8/* %changelog +* Mon Oct 06 2008 ms@suse.de +- fixed compiler warning in ifenslave.c: + *ordered comparison of pointer with integer zero (bnc #431910) * Thu Sep 04 2008 ms@suse.de - fixed ping signal handling during address lookup (bnc #416404) * Wed Dec 12 2007 rguenther@suse.de