From 315054f4737a39489e0a14f3a92bff61f1592832 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 16 Jan 2015 06:40:24 +0000 Subject: Replace with and other less dirty headers where possible. Annotate lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol) --- usr.sbin/pcidump/pcidump.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin/pcidump') diff --git a/usr.sbin/pcidump/pcidump.c b/usr.sbin/pcidump/pcidump.c index 065d2cf9402..0ae2377c14b 100644 --- a/usr.sbin/pcidump/pcidump.c +++ b/usr.sbin/pcidump/pcidump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcidump.c,v 1.36 2014/05/20 01:25:24 guenther Exp $ */ +/* $OpenBSD: pcidump.c,v 1.37 2015/01/16 06:40:19 deraadt Exp $ */ /* * Copyright (c) 2006, 2007 David Gwynne @@ -16,8 +16,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include -#include #include #include @@ -32,6 +32,7 @@ #include #include #include +#include #define PCIDEV "/dev/pci" @@ -104,7 +105,7 @@ main(int argc, char *argv[]) { int nfuncs; int bus, dev, func; - char pcidev[MAXPATHLEN] = PCIDEV; + char pcidev[PATH_MAX] = PCIDEV; char *romfile = NULL; const char *errstr; int c, error = 0, dumpall = 1, domid = 0; -- cgit v1.2.3