[Bug 431910] New: iputils-ss021109-265: 6 * ordered comparison of pointer with integer zero
https://bugzilla.novell.com/show_bug.cgi?id=431910 Summary: iputils-ss021109-265: 6 * ordered comparison of pointer with integer zero Product: openSUSE 11.1 Version: Factory Platform: All OS/Version: openSUSE 11.0 Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: --- I just tried to compile Suse Linux package iputils-ss021109-265 and the compiler said ifenslave.c:519: warning: ordered comparison of pointer with integer zero The source code is if (strncpy(if_ipaddr.ifr_name, slave_ifname, IFNAMSIZ) <= 0 || ioctl(skfd, SIOCSIFADDR, &if_ipaddr) < 0) { Suggest replace code with if ((strncpy(if_ipaddr.ifr_name, slave_ifname, IFNAMSIZ) == 0) || (ioctl(skfd, SIOCSIFADDR, &if_ipaddr) < 0)) { Similar fun & games in the same package with ifenslave.c:532: warning: ordered comparison of pointer with integer zero ifenslave.c:541: warning: ordered comparison of pointer with integer zero ifenslave.c:553: warning: ordered comparison of pointer with integer zero ifenslave.c:566: warning: ordered comparison of pointer with integer zero ifenslave.c:586: warning: ordered comparison of pointer with integer zero -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=431910 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |ms@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=431910 User ms@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=431910#c1 Marcus Schaefer <ms@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Marcus Schaefer <ms@novell.com> 2008-10-06 02:26:35 MDT --- you are right as strncpy returns a pointer to the destination string a check for <= 0 makes not much sense. I will fix it thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=431910 User ms@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=431910#c2 Marcus Schaefer <ms@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #2 from Marcus Schaefer <ms@novell.com> 2008-10-06 02:56:20 MDT --- fixed... package submission follows -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com