svn commit: trunk/busybox/networking/libiproute
aldot at busybox.net
aldot at busybox.net
Fri May 16 09:55:17 PDT 2008
Author: aldot
Date: 2008-05-16 09:55:17 -0700 (Fri, 16 May 2008)
New Revision: 21992
Log:
- very minor shrinkage
odd that this saved 1byte. And there could be something wrong with
ifcombine or the like since omitting the braces produces bigger code?
Modified:
trunk/busybox/networking/libiproute/ll_addr.c
Changeset:
Modified: trunk/busybox/networking/libiproute/ll_addr.c
===================================================================
--- trunk/busybox/networking/libiproute/ll_addr.c 2008-05-16 16:21:00 UTC (rev 21991)
+++ trunk/busybox/networking/libiproute/ll_addr.c 2008-05-16 16:55:17 UTC (rev 21992)
@@ -64,14 +64,10 @@
*cp = 0;
cp++;
}
- if (sscanf(arg, "%x", &temp) != 1) {
+ if (sscanf(arg, "%x", &temp) != 1 || (temp < 0 || temp > 255)) {
bb_error_msg("\"%s\" is invalid lladdr", arg);
return -1;
}
- if (temp < 0 || temp > 255) {
- bb_error_msg("\"%s\" is invalid lladdr", arg);
- return -1;
- }
lladdr[i] = temp;
if (!cp) {
break;
More information about the busybox-cvs
mailing list