diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2005-05-26 05:33:49 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2005-05-26 05:33:49 +0000 |
commit | 00bcb3cec99ba1cbb6d3d0ea8d0337e9dd429259 (patch) | |
tree | effa1ab16495fa611a2b26128a39d5e1af066a8a | |
parent | 97035bac6c4474f09337ce7b7f1585a9bf40e0a9 (diff) |
Initialize variables
-rw-r--r-- | usr.sbin/sasyncd/monitor.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/sasyncd/monitor.c b/usr.sbin/sasyncd/monitor.c index b347be7ffda..e3abbe34e24 100644 --- a/usr.sbin/sasyncd/monitor.c +++ b/usr.sbin/sasyncd/monitor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.2 2005/05/26 00:55:03 ho Exp $ */ +/* $OpenBSD: monitor.c,v 1.3 2005/05/26 05:33:48 ho Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -237,7 +237,7 @@ monitor_get_pfkey_snap(u_int8_t **sadb, u_int32_t *sadbsize, u_int8_t **spd, static void m_priv_pfkey_snap(int s) { - u_int8_t *sadb_buf, *spd_buf; + u_int8_t *sadb_buf = 0, *spd_buf = 0; size_t sadb_buflen = 0, spd_buflen = 0, sz; int mib[5]; u_int32_t v; @@ -249,7 +249,6 @@ m_priv_pfkey_snap(int s) mib[4] = 0; /* Unspec SA type */ /* First, fetch SADB data */ - if (sysctl(mib, sizeof mib / sizeof mib[0], NULL, &sz, NULL, 0) == -1 || sz == 0) { sadb_buflen = 0; |