use the same definition for array dimension and sensibility checks
[unix-history] / usr / src / sys / netinet / in.c
index 841ce3c..5085f9e 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)in.c        7.1 (Berkeley) %G%
+ *     @(#)in.c        7.2 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -155,7 +155,7 @@ in_localaddr(in)
                net = i & IN_CLASSC_NET;
 
        for (ia = in_ifaddr; ia; ia = ia->ia_next)
                net = i & IN_CLASSC_NET;
 
        for (ia = in_ifaddr; ia; ia = ia->ia_next)
-               if (net == subnetsarelocal ? ia->ia_net : ia->ia_subnet)
+               if (net == (subnetsarelocal ? ia->ia_net : ia->ia_subnet))
                        return (1);
        return (0);
 }
                        return (1);
        return (0);
 }