From 5fa91b788f4fc5f6654e74f30abd5a46645a5408 Mon Sep 17 00:00:00 2001 From: rob Date: Sat, 20 Jan 2018 18:49:12 +0000 Subject: [PATCH] Fix uninitialized variable. Ok jca@ --- usr.sbin/snmpd/trap.c | 7 +++---- 1 file 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 @@ -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); -- 2.20.1