summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-09-28 04:13:09 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-09-28 04:13:09 +0000
commitf9359509b243f6549c34db3483f4378ee8057d46 (patch)
tree308f2dedb712a3fdef26c3325ef0b6762f624d6f
parentd3b60e22f92b55ff86c6762acb0ffc88956c85e6 (diff)
according to the strlcpy man page the order of arguments
is: destination, source, size. it seems in the commit of version 1.3 a couple of maxwell daemons of the second kind exchanged second and third arguments in every call to the stlcpy, thanks gcc. at this late hour we hope they are up to their eternity-spanning poker game for hot molecules and the diff will finally get in untampered.
-rw-r--r--usr.sbin/rbootd/bpf.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.sbin/rbootd/bpf.c b/usr.sbin/rbootd/bpf.c
index 7fff787ff4f..264dc3c7efc 100644
--- a/usr.sbin/rbootd/bpf.c
+++ b/usr.sbin/rbootd/bpf.c
@@ -235,7 +235,7 @@ BpfGetIntfName(errmsg)
*errmsg = errbuf;
if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- (void) strlcpy(errbuf, sizeof(errbuf), "bpf: socket: %m");
+ (void) strlcpy(errbuf, "bpf: socket: %m", sizeof(errbuf));
return(NULL);
}
ifc.ifc_len = sizeof ibuf;
@@ -244,15 +244,15 @@ BpfGetIntfName(errmsg)
#ifdef OSIOCGIFCONF
if (ioctl(fd, OSIOCGIFCONF, (char *)&ifc) < 0 ||
ifc.ifc_len < sizeof(struct ifreq)) {
- (void) strlcpy(errbuf, sizeof (errbuf),
- "bpf: ioctl(OSIOCGIFCONF): %m");
+ (void) strlcpy(errbuf, "bpf: ioctl(OSIOCGIFCONF): %m",
+ sizeof (errbuf));
return(NULL);
}
#else
if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 ||
ifc.ifc_len < sizeof(struct ifreq)) {
- (void) strlcpy(errbuf, sizeof(errbuf),
- "bpf: ioctl(SIOCGIFCONF): %m");
+ (void) strlcpy(errbuf, "bpf: ioctl(SIOCGIFCONF): %m",
+ sizeof(errbuf));
return(NULL);
}
#endif
@@ -263,8 +263,8 @@ BpfGetIntfName(errmsg)
minunit = 666;
for (; ifrp < ifend; ++ifrp) {
if (ioctl(fd, SIOCGIFFLAGS, (char *)ifrp) < 0) {
- (void) strlcpy(errbuf, sizeof(errbuf),
- "bpf: ioctl(SIOCGIFFLAGS): %m");
+ (void) strlcpy(errbuf, "bpf: ioctl(SIOCGIFFLAGS): %m",
+ sizeof(errbuf));
return(NULL);
}
@@ -291,8 +291,8 @@ BpfGetIntfName(errmsg)
(void) close(fd);
if (mp == 0) {
- (void) strlcpy(errbuf, sizeof(errbuf),
- "bpf: no interfaces found");
+ (void) strlcpy(errbuf, "bpf: no interfaces found",
+ sizeof(errbuf));
return(NULL);
}