Commit

Comments (0)

Files changed (1)

File usr/src/cmd/cmd-inet/usr.sbin/route.c Modified

View file
  • Ignore whitespace
  • Hide word diff
 static int ipRouteEntrySize;
 static int ipv6RouteEntrySize;
 
-#define	ROUNDUP_LONG(a) \
-	((a) > 0 ? (1 + (((a) - 1) | (sizeof (long) - 1))) : sizeof (long))
-#define	ADVANCE(x, n) ((x) += ROUNDUP_LONG(salen(n)))
+#define	ROUNDUP_INT32(a) \
+	((a) > 0 ? (1 + (((a) - 1) | (sizeof (int32_t) - 1))) : sizeof (int32_t))
+#define	ADVANCE(x, n) ((x) += ROUNDUP_INT32(salen(n)))
 #define	C(x)	((x) & 0xff)
 
 /*
 			 * width subnet fields.
 			 */
 			while (in.s_addr &~ mask)
-				mask = (long)mask >> subnetshift;
+				mask = (int64_t)mask >> subnetshift;
 			net = in.s_addr & mask;
 			while ((mask & 1) == 0)
 				mask >>= 1, net >>= 1;
 
 #define	NEXTADDR(w, u) \
 	if (newrt->ri_addrs & (w)) { \
-		l = ROUNDUP_LONG(salen(&u.sa)); \
+		l = ROUNDUP_INT32(salen(&u.sa)); \
 		(void) memmove(cp, &(u), l); \
 		cp += l; \
 		if (verbose) \