summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-05-15 19:00:03 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-05-15 19:00:03 +0000
commitd35a433ba50c5edc5ee1e5f646428209ec1e7800 (patch)
tree08d63ac326d602d1700f700c93fd6067681864ad
parent411a101864362379045788e630dc06389422f4fc (diff)
fix uninitialised variable; from ray@
-rw-r--r--usr.bin/tcpbench/Makefile2
-rw-r--r--usr.bin/tcpbench/tcpbench.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tcpbench/Makefile b/usr.bin/tcpbench/Makefile
index b3242e9e047..5e6acea0f46 100644
--- a/usr.bin/tcpbench/Makefile
+++ b/usr.bin/tcpbench/Makefile
@@ -3,7 +3,7 @@ MAN= tcpbench.1
CDIAGFLAGS= -Wall
#CDIAGFLAGS+= -Werror
CDIAGFLAGS+= -Wpointer-arith
-CDIAGFLAGS+= -Wno-uninitialized
+CDIAGFLAGS+= -Wuninitialized
CDIAGFLAGS+= -Wstrict-prototypes
CDIAGFLAGS+= -Wmissing-prototypes
CDIAGFLAGS+= -Wunused
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index 3332016eaa8..9493968de0a 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -138,8 +138,8 @@ saddr_ntop(const struct sockaddr *addr, socklen_t alen, char *buf, size_t len)
char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
int herr;
- if (getnameinfo(addr, alen, hbuf, sizeof(hbuf), pbuf, sizeof(pbuf),
- NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
+ if ((herr = getnameinfo(addr, alen, hbuf, sizeof(hbuf),
+ pbuf, sizeof(pbuf), NI_NUMERICHOST|NI_NUMERICSERV)) != 0) {
if (herr == EAI_SYSTEM)
err(1, "getnameinfo");
else
@@ -734,7 +734,7 @@ main(int argc, char **argv)
const char *errstr;
int ch, herr;
struct addrinfo *aitop, hints;
- kvm_t *kvmh;
+ kvm_t *kvmh = NULL;
const char *host = NULL, *port = DEFAULT_PORT;
char **kflag = NULL;