From ea0867c051a592adb42d79358daf87a9232c632a Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 16 Jan 2015 15:57:06 +0000 Subject: [PATCH] move to where possible, annotate otherwise --- usr.sbin/iscsid/initiator.c | 6 +++--- usr.sbin/iscsid/iscsid.c | 5 ++--- usr.sbin/iscsid/util.c | 6 +++--- usr.sbin/iscsid/vscsi.c | 3 +-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/usr.sbin/iscsid/initiator.c b/usr.sbin/iscsid/initiator.c index 22ab3d856d5..e8e0a215d33 100644 --- a/usr.sbin/iscsid/initiator.c +++ b/usr.sbin/iscsid/initiator.c @@ -1,4 +1,4 @@ -/* $OpenBSD: initiator.c,v 1.14 2014/11/23 13:08:21 claudio Exp $ */ +/* $OpenBSD: initiator.c,v 1.15 2015/01/16 15:57:06 deraadt Exp $ */ /* * Copyright (c) 2009 Claudio Jeker @@ -16,7 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include #include @@ -29,6 +28,7 @@ #include #include #include +#include #include "iscsid.h" #include "log.h" @@ -542,7 +542,7 @@ initiator_logout_cb(struct connection *c, void *arg, struct pdu *p) char * default_initiator_name(void) { - char *s, hostname[MAXHOSTNAMELEN]; + char *s, hostname[HOST_NAME_MAX+1]; if (gethostname(hostname, sizeof(hostname))) strlcpy(hostname, "initiator", sizeof(hostname)); diff --git a/usr.sbin/iscsid/iscsid.c b/usr.sbin/iscsid/iscsid.c index a204db9391c..4a02c2aa387 100644 --- a/usr.sbin/iscsid/iscsid.c +++ b/usr.sbin/iscsid/iscsid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iscsid.c,v 1.17 2014/11/03 16:45:00 tedu Exp $ */ +/* $OpenBSD: iscsid.c,v 1.18 2015/01/16 15:57:06 deraadt Exp $ */ /* * Copyright (c) 2009 Claudio Jeker @@ -16,8 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -#include +#include /* nitems */ #include #include #include diff --git a/usr.sbin/iscsid/util.c b/usr.sbin/iscsid/util.c index ccebaab1eb8..bf510d2d6e0 100644 --- a/usr.sbin/iscsid/util.c +++ b/usr.sbin/iscsid/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.4 2014/04/21 17:41:52 claudio Exp $ */ +/* $OpenBSD: util.c,v 1.5 2015/01/16 15:57:06 deraadt Exp $ */ /* * Copyright (c) 2009 Claudio Jeker @@ -15,8 +15,8 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -#include + +#include /* nitems */ #include #include #include diff --git a/usr.sbin/iscsid/vscsi.c b/usr.sbin/iscsid/vscsi.c index f42985869a5..4093d7ed1fa 100644 --- a/usr.sbin/iscsid/vscsi.c +++ b/usr.sbin/iscsid/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.14 2014/05/10 11:28:02 claudio Exp $ */ +/* $OpenBSD: vscsi.c,v 1.15 2015/01/16 15:57:06 deraadt Exp $ */ /* * Copyright (c) 2009 Claudio Jeker @@ -16,7 +16,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include /* for nitems */ #include #include -- 2.20.1