diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2012-03-07 22:24:02 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2012-03-07 22:24:02 +0000 |
commit | 233f9e36ee8d1415283602b90ac8140571855aa6 (patch) | |
tree | 95fc7f88a55297e61ade72049dd6101c84d45aa8 /usr.sbin/tftpd | |
parent | 9ceb8274601e0b7098c73f8e315f08bfc0da0128 (diff) |
dont mix code and declarations.
Diffstat (limited to 'usr.sbin/tftpd')
-rw-r--r-- | usr.sbin/tftpd/Makefile | 4 | ||||
-rw-r--r-- | usr.sbin/tftpd/tftpd.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/tftpd/Makefile b/usr.sbin/tftpd/Makefile index 7fc9d633ed3..368dc1c757d 100644 --- a/usr.sbin/tftpd/Makefile +++ b/usr.sbin/tftpd/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.2 2012/03/02 04:51:21 dlg Exp $ +# $OpenBSD: Makefile,v 1.3 2012/03/07 22:24:01 dlg Exp $ PROG= tftpd SRCS= tftpd.c LDADD= -levent DPADD= ${LIBEVENT} -CFLAGS+= -Wall -Werror +CFLAGS+= -Wall -Werror -pedantic MAN= tftpd.8 diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c index 810a55c4ac9..f331fc9c79e 100644 --- a/usr.sbin/tftpd/tftpd.c +++ b/usr.sbin/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.3 2012/03/02 16:39:22 jmc Exp $ */ +/* $OpenBSD: tftpd.c,v 1.4 2012/03/07 22:24:01 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@uq.edu.au> @@ -485,13 +485,13 @@ tftpd_listen(const char *addr, const char *port, int family) int saved_errno; const char *cause = NULL; + int on = 1; + memset(&hints, 0, sizeof(hints)); hints.ai_family = family; hints.ai_socktype = SOCK_DGRAM; hints.ai_flags = AI_PASSIVE; - int on = 1; - TAILQ_INIT(&tftp_servers); error = getaddrinfo(addr, port, &hints, &res0); |