summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;