diff toys/other/ifconfig.c @ 1238:1aa9b7f39e4a draft

In ifconfig.c, there is a glitch in function get_addrinfo() when computing the prefix length.
author Ashwini Sharma <ak.ashwini1981@gmail.com>
date Wed, 02 Apr 2014 06:35:33 -0500
parents 40e0f7b09b77
children eb19245b94b6
line wrap: on
line diff
--- a/toys/other/ifconfig.c	Tue Apr 01 18:20:00 2014 -0500
+++ b/toys/other/ifconfig.c	Wed Apr 02 06:35:33 2014 -0500
@@ -88,7 +88,7 @@
   freeaddrinfo(result);
 
   len = -1;
-  if (slash) len = atolx_range(slash+1, 0, (af == AF_INET) ? 128 : 32);
+  if (slash) len = atolx_range(slash+1, 0, (af == AF_INET) ? 32 : 128);
 
   return len;
 }