diff options
author | 2000-09-28 04:13:08 +0000 | |
---|---|---|
committer | 2000-09-28 04:13:08 +0000 | |
commit | 7dbc111b83fa7f285f4a3caeeec3a19326645eac (patch) | |
tree | 50e6689047cf0ea44c7dd061308160bdb1042f7e | |
parent | merged with NetBSD, 20000927 and fixes PR 1421; ok millert@ (diff) | |
download | wireguard-openbsd-7dbc111b83fa7f285f4a3caeeec3a19326645eac.tar.xz wireguard-openbsd-7dbc111b83fa7f285f4a3caeeec3a19326645eac.zip |
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.c | 18 |
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); } |