summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorrob <rob@cvs.openbsd.org>2018-01-20 18:49:13 +0000
committerrob <rob@cvs.openbsd.org>2018-01-20 18:49:13 +0000
commite817621d0d8a415fdbeacca0609a24b77c0fd3af (patch)
treee255323970ff7fc380fa7628c18566041eed3e45 /usr.sbin/snmpd
parent04d52a044c752d3d26f677d0f9fb3bc92cd74712 (diff)
Fix uninitialized variable.
Ok jca@
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/trap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/snmpd/trap.c b/usr.sbin/snmpd/trap.c
index 2c26332bf48..8a6489a70f5 100644
--- a/usr.sbin/snmpd/trap.c
+++ b/usr.sbin/snmpd/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.29 2017/04/21 13:46:15 jca Exp $ */
+/* $OpenBSD: trap.c,v 1.30 2018/01/20 18:49:12 rob Exp $ */
/*
* Copyright (c) 2008 Reyk Floeter <reyk@openbsd.org>
@@ -65,7 +65,6 @@ trap_agentx(struct agentx_handle *h, struct agentx_pdu *pdu, int *idx,
int ret = AGENTX_ERR_NONE;
int seensysuptime, seentrapoid;
size_t len = 0;
- pid_t pid = -1;
char *v = NULL;
*varcpy = NULL;
@@ -125,8 +124,8 @@ trap_agentx(struct agentx_handle *h, struct agentx_pdu *pdu, int *idx,
if (varbind != NULL)
len = ber_calc_len(varbind);
- log_debug("trap_agentx: from pid %u len %zd elements %d",
- pid, len, x);
+ log_debug("trap_agentx: from packetid %d len %zu elements %d",
+ pdu->hdr->packetid, len, x);
trap_send(&o, varbind);