- Fix build on 5-x due to bad NULL usage.

PR:		ports/64906
Submitted by:	maintainer
This commit is contained in:
Kirill Ponomarev 2004-03-30 09:11:56 +00:00
parent d1a216dc1f
commit 6cdda55cf0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105681
3 changed files with 9 additions and 8 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/

View File

@ -1,5 +1,5 @@
--- ../arpwatch.orig/db.c Sat Sep 30 19:39:58 2000
+++ ./db.c Mon Sep 15 13:17:07 2003
--- db.c.orig Sat Sep 30 19:39:58 2000
+++ db.c Mon Mar 29 14:26:14 2004
@@ -41,6 +41,7 @@
#include <string.h>
#include <syslog.h>
@ -58,7 +58,7 @@
register u_int len;
u_char *e2;
time_t t2;
+ register evt_type event = NULL;
+ register evt_type event = 0;
+ char *if2 = NULL;
+
+ pthread_mutex_lock(&mtx_einfo);
@ -81,7 +81,7 @@
+ strncpy(ep->iface, interface, sizeof(ep->iface));
+ event |= ETHER_NEW;
+ e2 = NULL;
+ t2 = NULL;
+ t2 = 0;
+ }
+ } else if (! initializing) {
+ if (strncmp(ep->iface, interface, sizeof(ep->iface)) != 0) {
@ -127,7 +127,7 @@
+ ap->elist[0] = elist_alloc(a, e, t, h, interface);
+ event |= IP_NEW;
+ e2 = NULL;
+ t2 = NULL;
+ t2 = 0;
}
/* Check for a flip-flop */

View File

@ -1,5 +1,5 @@
--- ../arpwatch.orig/report.c Sat Sep 30 19:41:10 2000
+++ ./report.c Fri Sep 12 18:57:04 2003
--- report.c.orig Sat Sep 30 19:41:10 2000
+++ report.c Mon Mar 29 14:24:36 2004
@@ -45,6 +45,8 @@
#include <ctype.h>
@ -45,7 +45,7 @@
+ /* these types are sent to syslog instead of reported on.
+ * only continue if there are other events as well
+ */
+ if (event == NULL || (event & ~(IP_ETHER_REUSE | FLIPFLOP_DECNET) == 0))
+ if (event == 0 || (event & ~(IP_ETHER_REUSE | FLIPFLOP_DECNET) == 0))
+ return;
+
if (debug) {