mirror of
https://github.com/Ponce/slackbuilds
synced 2024-10-29 18:42:51 +01:00
21 lines
473 B
Diff
21 lines
473 B
Diff
|
--- arpwatch-2.1a15/arpwatch.c.bogon 2007-08-09 13:53:47.000000000 +0200
|
||
|
+++ arpwatch-2.1a15/arpwatch.c 2007-08-09 13:58:17.000000000 +0200
|
||
|
@@ -730,11 +730,12 @@ addnet(register const char *str)
|
||
|
|
||
|
/* XXX hack */
|
||
|
n = ntohl(inet_addr(tstr));
|
||
|
- while ((n & 0xff000000) == 0) {
|
||
|
- n <<= 8;
|
||
|
- if (n == 0)
|
||
|
- return (0);
|
||
|
- }
|
||
|
+ if (n || width != 32)
|
||
|
+ while ((n & 0xff000000) == 0) {
|
||
|
+ n <<= 8;
|
||
|
+ if (n == 0)
|
||
|
+ return (0);
|
||
|
+ }
|
||
|
n = htonl(n);
|
||
|
|
||
|
if (width != 0) {
|