summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2012-09-17 17:35:56 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2012-09-17 17:35:56 +0000
commit792539ba1233c55fdd2a55ebba3615fb22de6379 (patch)
treeaf58830609629b1f7f03ea85145aac049958a2e4 /usr.sbin/snmpd
parent5815345159fb5bba9a12d2b9f224cc4562f4c04e (diff)
silence gcc
Diffstat (limited to 'usr.sbin/snmpd')
-rw-r--r--usr.sbin/snmpd/usm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/snmpd/usm.c b/usr.sbin/snmpd/usm.c
index 643fcf537d9..2fb4b8d2b01 100644
--- a/usr.sbin/snmpd/usm.c
+++ b/usr.sbin/snmpd/usm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usm.c,v 1.1 2012/09/17 16:30:35 reyk Exp $ */
+/* $OpenBSD: usm.c,v 1.2 2012/09/17 17:35:55 reyk Exp $ */
/*
* Copyright (c) 2012 GeNUA mbH
@@ -148,7 +148,7 @@ usm_finduser(char *name)
int
usm_checkuser(struct usmuser *up, const char **errp)
{
- char *auth, *priv;
+ char *auth = NULL, *priv = NULL;
if (up->uu_auth != AUTH_NONE && up->uu_authkey == NULL) {
*errp = "missing auth passphrase";
@@ -270,8 +270,8 @@ usm_decode(struct snmp_message *msg, struct ber_element *elm, const char **errp)
if (engine_boots != 0LL && engine_time != 0LL) {
now = snmpd_engine_time();
if (engine_boots != env->sc_engine_boots ||
- engine_time < (now - SNMP_MAX_TIMEWINDOW) ||
- engine_time > (now + SNMP_MAX_TIMEWINDOW)) {
+ engine_time < (long long)(now - SNMP_MAX_TIMEWINDOW) ||
+ engine_time > (long long)(now + SNMP_MAX_TIMEWINDOW)) {
*errp = "out of time window";
msg->sm_usmerr = MIB_usmStatsNotInTimeWindow;
stats->snmp_usmtimewindow++;