CVS commit: src/external/mit/libuv/lib
Module Name:src Committed By: christos Date: Tue Apr 9 22:38:17 UTC 2024 Modified Files: src/external/mit/libuv/lib: Makefile Log Message: Now that the bug in bsd.lib.mk, MAKELINKLIB is not needed anymore (as it should not be). Pointed out by kre@ To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/mit/libuv/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mit/libuv/lib
Module Name:src Committed By: christos Date: Tue Apr 9 22:38:17 UTC 2024 Modified Files: src/external/mit/libuv/lib: Makefile Log Message: Now that the bug in bsd.lib.mk, MAKELINKLIB is not needed anymore (as it should not be). Pointed out by kre@ To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/mit/libuv/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/libuv/lib/Makefile diff -u src/external/mit/libuv/lib/Makefile:1.9 src/external/mit/libuv/lib/Makefile:1.10 --- src/external/mit/libuv/lib/Makefile:1.9 Fri Apr 5 08:03:24 2024 +++ src/external/mit/libuv/lib/Makefile Tue Apr 9 18:38:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2024/04/05 12:03:24 kre Exp $ +# $NetBSD: Makefile,v 1.10 2024/04/09 22:38:17 christos Exp $ LIBISPRIVATE=pic @@ -8,7 +8,6 @@ MKLINT= no LIB= uv MAKESTATICLIB=yes -MAKELINKLIB=yes .if ${LIBISPRIVATE:Uno} == "no" INCS= uv.h uv/unix.h uv/bsd.h uv/errno.h uv/version.h uv/threadpool.h
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 9 22:37:23 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: Merge two identical if's and fix a logic error in them ( && instead of ||) To generate a diff of this commit: cvs rdiff -u -r1.400 -r1.401 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.lib.mk diff -u src/share/mk/bsd.lib.mk:1.400 src/share/mk/bsd.lib.mk:1.401 --- src/share/mk/bsd.lib.mk:1.400 Thu Apr 4 21:16:00 2024 +++ src/share/mk/bsd.lib.mk Tue Apr 9 18:37:23 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.400 2024/04/05 01:16:00 christos Exp $ +# $NetBSD: bsd.lib.mk,v 1.401 2024/04/09 22:37:23 christos Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -425,9 +425,11 @@ _DEST.LINT:=${DESTDIR}${LINTLIBDIR} _DEST.DEBUG:=${DESTDIR}${DEBUGDIR}${LIBDIR} _DEST.ODEBUG:=${DESTDIR}${DEBUGDIR}${_LIBSODIR} +_BUILDSTATICLIB= ${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ +|| ${MAKELINKLIB} != "no" || ${MAKESTATICLIB} != "no" + .if defined(LIB) # { -.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no" +.if ${_BUILDSTATICLIB} _LIBS=${_LIB.a} .else _LIBS= @@ -482,8 +484,7 @@ _LIBS+=${_LIB.ln} .endif ALLOBJS= -.if (${MKPIC} == "no" || (defined(LDSTATIC) && ${LDSTATIC} != "") \ - || ${MAKELINKLIB} != "no") && ${MAKESTATICLIB} != "no" +.if ${_BUILDSTATICLIB} ALLOBJS+=${STOBJS} .endif ALLOBJS+=${POBJS} ${SOBJS}
CVS commit: src/share/mk
Module Name:src Committed By: christos Date: Tue Apr 9 22:37:23 UTC 2024 Modified Files: src/share/mk: bsd.lib.mk Log Message: Merge two identical if's and fix a logic error in them ( && instead of ||) To generate a diff of this commit: cvs rdiff -u -r1.400 -r1.401 src/share/mk/bsd.lib.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists/etc
Module Name:src Committed By: kre Date: Tue Apr 9 21:02:17 UTC 2024 Modified Files: src/distrib/sets/lists/etc: mi Log Message: Revert previous, we have no /etc/skel/.editrc (currently anyway). This change looks to have been accidentally included in the big sets reduction/division. This should fix the builds. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/distrib/sets/lists/etc/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/etc/mi diff -u src/distrib/sets/lists/etc/mi:1.274 src/distrib/sets/lists/etc/mi:1.275 --- src/distrib/sets/lists/etc/mi:1.274 Tue Apr 9 15:17:24 2024 +++ src/distrib/sets/lists/etc/mi Tue Apr 9 21:02:17 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.274 2024/04/09 15:17:24 nia Exp $ +# $NetBSD: mi,v 1.275 2024/04/09 21:02:17 kre Exp $ # # Note: end-user configuration files that are moved to another location # should not be marked "obsolete"; they should just be removed from @@ -356,7 +356,6 @@ ./etc/shells etc-sys-etc ./etc/shrc etc-util-etc ./etc/skel/.cshrcetc-sys-etc -./etc/skel/.editrcetc-sys-etc ./etc/skel/.loginetc-sys-etc ./etc/skel/.logoutetc-sys-etc ./etc/skel/.profileetc-sys-etc
CVS commit: src/distrib/sets/lists/etc
Module Name:src Committed By: kre Date: Tue Apr 9 21:02:17 UTC 2024 Modified Files: src/distrib/sets/lists/etc: mi Log Message: Revert previous, we have no /etc/skel/.editrc (currently anyway). This change looks to have been accidentally included in the big sets reduction/division. This should fix the builds. To generate a diff of this commit: cvs rdiff -u -r1.274 -r1.275 src/distrib/sets/lists/etc/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Apr 9 17:06:12 UTC 2024 Modified Files: src/doc: 3RDPARTY Log Message: doc: openssl 3.3.0 out To generate a diff of this commit: cvs rdiff -u -r1.2001 -r1.2002 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.2001 src/doc/3RDPARTY:1.2002 --- src/doc/3RDPARTY:1.2001 Sun Mar 31 00:06:23 2024 +++ src/doc/3RDPARTY Tue Apr 9 17:06:12 2024 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.2001 2024/03/31 00:06:23 riastradh Exp $ +# $NetBSD: 3RDPARTY,v 1.2002 2024/04/09 17:06:12 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1122,7 +1122,7 @@ markus is very cooperative about it): Package: OpenSSL Version: 1.0.2o/1.1.1t/3.0.12 -Current Vers: 1.0.2zd/1.1.1u/3.0.12/3.1.4 +Current Vers: 1.0.2zd/1.1.1u/3.0.12/3.3.0 Maintainer: The OpenSSL Project Archive Site: ftp://ftp.openssl.org/source/ Home Page: http://www.openssl.org/
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Tue Apr 9 17:06:12 UTC 2024 Modified Files: src/doc: 3RDPARTY Log Message: doc: openssl 3.3.0 out To generate a diff of this commit: cvs rdiff -u -r1.2001 -r1.2002 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: nia Date: Tue Apr 9 15:17:25 UTC 2024 Modified Files: src/distrib/common/bootimage: Makefile.bootimage src/distrib/sets: maketars regpkgset sets.subr src/distrib/sets/lists/base: ad.aarch64 ad.arm ad.mips ad.powerpc md.amd64 md.sparc64 mi shl.mi src/distrib/sets/lists/debug: ad.aarch64 md.amd64 md.sparc64 mi shl.mi src/distrib/sets/lists/etc: mi src/distrib/sets/lists/man: mi src/distrib/utils/embedded: mkimage src/usr.sbin/sysinst: Makefile.inc defs.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl util.c src/usr.sbin/sysinst/arch/amd64: md.h src/usr.sbin/sysinst/arch/evbarm: md.h Added Files: src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64 md.sparc64 mi src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64 md.sparc64 mi src/distrib/sets/lists/manhtml: mi Log Message: Add new sets: base32, debug32, manhtml - base32 contains (when MKCOMPAT=yes) shared libraries for 32-bit compatibility, previously included in base - debug32 contains (when MKCOMPAT=yes) debug symbols and static libraries containing debug symbols for 32-bit compatiblity, previously included in debug - manhtml contains (when MKHTML=yes) the HTML files previously included in 'man', which are of limited utility without third-party software. The motivation for this change is to be able to easily exclude sets from CD-ROM images that go over the size limit without xz compression (which many NetBSD platforms struggle to extract at acceptable speeds). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/distrib/common/bootimage/Makefile.bootimage cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/maketars cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/regpkgset cvs rdiff -u -r1.204 -r1.205 src/distrib/sets/sets.subr cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/base/ad.aarch64 cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/base/ad.arm cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/base/ad.powerpc cvs rdiff -u -r1.296 -r1.297 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.262 -r1.263 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.1341 -r1.1342 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.978 -r1.979 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base32/ad.aarch64 \ src/distrib/sets/lists/base32/ad.mips64eb \ src/distrib/sets/lists/base32/ad.mips64el \ src/distrib/sets/lists/base32/ad.mipsn64eb \ src/distrib/sets/lists/base32/ad.mipsn64el \ src/distrib/sets/lists/base32/ad.powerpc64 \ src/distrib/sets/lists/base32/ad.riscv64 \ src/distrib/sets/lists/base32/md.amd64 \ src/distrib/sets/lists/base32/md.sparc64 src/distrib/sets/lists/base32/mi cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/debug/ad.aarch64 cvs rdiff -u -r1.123 -r1.124 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.89 -r1.90 src/distrib/sets/lists/debug/md.sparc64 cvs rdiff -u -r1.430 -r1.431 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.339 -r1.340 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/debug32/ad.aarch64 \ src/distrib/sets/lists/debug32/ad.mips64eb \ src/distrib/sets/lists/debug32/ad.mips64el \ src/distrib/sets/lists/debug32/ad.mipsn64eb \ src/distrib/sets/lists/debug32/ad.mipsn64el \ src/distrib/sets/lists/debug32/ad.powerpc64 \ src/distrib/sets/lists/debug32/ad.riscv64 \ src/distrib/sets/lists/debug32/md.amd64 \ src/distrib/sets/lists/debug32/md.sparc64 \ src/distrib/sets/lists/debug32/mi cvs rdiff -u -r1.273 -r1.274 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1771 -r1.1772 src/distrib/sets/lists/man/mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/manhtml/mi cvs rdiff -u -r1.81 -r1.82 src/distrib/utils/embedded/mkimage cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/sysinst/Makefile.inc cvs rdiff -u -r1.90 -r1.91 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/sysinst/msg.mi.de \ src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.74 -r1.75 src/usr.sbin/sysinst/util.c cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/arch/amd64/md.h cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/arch/evbarm/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: src
Module Name:src Committed By: nia Date: Tue Apr 9 15:17:25 UTC 2024 Modified Files: src/distrib/common/bootimage: Makefile.bootimage src/distrib/sets: maketars regpkgset sets.subr src/distrib/sets/lists/base: ad.aarch64 ad.arm ad.mips ad.powerpc md.amd64 md.sparc64 mi shl.mi src/distrib/sets/lists/debug: ad.aarch64 md.amd64 md.sparc64 mi shl.mi src/distrib/sets/lists/etc: mi src/distrib/sets/lists/man: mi src/distrib/utils/embedded: mkimage src/usr.sbin/sysinst: Makefile.inc defs.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl util.c src/usr.sbin/sysinst/arch/amd64: md.h src/usr.sbin/sysinst/arch/evbarm: md.h Added Files: src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64 md.sparc64 mi src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64 md.sparc64 mi src/distrib/sets/lists/manhtml: mi Log Message: Add new sets: base32, debug32, manhtml - base32 contains (when MKCOMPAT=yes) shared libraries for 32-bit compatibility, previously included in base - debug32 contains (when MKCOMPAT=yes) debug symbols and static libraries containing debug symbols for 32-bit compatiblity, previously included in debug - manhtml contains (when MKHTML=yes) the HTML files previously included in 'man', which are of limited utility without third-party software. The motivation for this change is to be able to easily exclude sets from CD-ROM images that go over the size limit without xz compression (which many NetBSD platforms struggle to extract at acceptable speeds). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/distrib/common/bootimage/Makefile.bootimage cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/maketars cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/regpkgset cvs rdiff -u -r1.204 -r1.205 src/distrib/sets/sets.subr cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/base/ad.aarch64 cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/base/ad.arm cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/base/ad.powerpc cvs rdiff -u -r1.296 -r1.297 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.262 -r1.263 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.1341 -r1.1342 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.978 -r1.979 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base32/ad.aarch64 \ src/distrib/sets/lists/base32/ad.mips64eb \ src/distrib/sets/lists/base32/ad.mips64el \ src/distrib/sets/lists/base32/ad.mipsn64eb \ src/distrib/sets/lists/base32/ad.mipsn64el \ src/distrib/sets/lists/base32/ad.powerpc64 \ src/distrib/sets/lists/base32/ad.riscv64 \ src/distrib/sets/lists/base32/md.amd64 \ src/distrib/sets/lists/base32/md.sparc64 src/distrib/sets/lists/base32/mi cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/debug/ad.aarch64 cvs rdiff -u -r1.123 -r1.124 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.89 -r1.90 src/distrib/sets/lists/debug/md.sparc64 cvs rdiff -u -r1.430 -r1.431 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.339 -r1.340 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/debug32/ad.aarch64 \ src/distrib/sets/lists/debug32/ad.mips64eb \ src/distrib/sets/lists/debug32/ad.mips64el \ src/distrib/sets/lists/debug32/ad.mipsn64eb \ src/distrib/sets/lists/debug32/ad.mipsn64el \ src/distrib/sets/lists/debug32/ad.powerpc64 \ src/distrib/sets/lists/debug32/ad.riscv64 \ src/distrib/sets/lists/debug32/md.amd64 \ src/distrib/sets/lists/debug32/md.sparc64 \ src/distrib/sets/lists/debug32/mi cvs rdiff -u -r1.273 -r1.274 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1771 -r1.1772 src/distrib/sets/lists/man/mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/manhtml/mi cvs rdiff -u -r1.81 -r1.82 src/distrib/utils/embedded/mkimage cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/sysinst/Makefile.inc cvs rdiff -u -r1.90 -r1.91 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/sysinst/msg.mi.de \ src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.74 -r1.75 src/usr.sbin/sysinst/util.c cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/arch/amd64/md.h cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/arch/evbarm/md.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/lib/libutil
On Mon, Apr 08, 2024 at 23:31:16 +0200, Roland Illig wrote: > Am 08.04.2024 um 21:18 schrieb Valery Ushakov: > > "=\017FIFTEEN\0" > > > > with its result a few lines below that has: > > > > BURST=0xf=FIFTEEN > > Thank you for explaining this example. I had a gut feeling that there > would be some hidden correlation between some octal/hexadecimal > combinations, but I couldn't name it. Indeed, if the number base for > output is hexadecimal, the field comparisons should be done in > hexadecimal as well. > > I adjusted the description and examples in the manual page accordingly. Thanks! My unscientific impression is that snprintb(3) was not very popular and its uses sometimes are a bit of a cargo-cult, so existing use cases have to be taken with a grain of salt and don't necessarily represent good style. This is why improving the docs with good examples is important, imho. -uwe
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: yamaguchi Date: Tue Apr 9 08:53:08 UTC 2024 Modified Files: src/sbin/ifconfig: lagg.c Log Message: lagg(4): allocate memory for struct lagg_req by calloc(3) to fix build error on clang To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sbin/ifconfig/lagg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/lagg.c diff -u src/sbin/ifconfig/lagg.c:1.7 src/sbin/ifconfig/lagg.c:1.8 --- src/sbin/ifconfig/lagg.c:1.7 Mon Apr 8 00:50:49 2024 +++ src/sbin/ifconfig/lagg.c Tue Apr 9 08:53:08 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: lagg.c,v 1.7 2024/04/08 00:50:49 yamaguchi Exp $ */ +/* $NetBSD: lagg.c,v 1.8 2024/04/09 08:53:08 yamaguchi Exp $ */ /* * Copyright (c) 2021 Internet Initiative Japan Inc. @@ -28,7 +28,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: lagg.c,v 1.7 2024/04/08 00:50:49 yamaguchi Exp $"); +__RCSID("$NetBSD: lagg.c,v 1.8 2024/04/09 08:53:08 yamaguchi Exp $"); #endif /* !defined(lint) */ #include @@ -393,15 +393,13 @@ setlaggproto(prop_dictionary_t env, prop static int setlaggport(prop_dictionary_t env, prop_dictionary_t oenv __unused) { - struct { - struct lagg_req req; - struct laggreqport port[1]; - } _req; struct lagg_req *req; struct laggreqport *rp; const char *ifname; enum lagg_ioctl ioc; int64_t lpcmd, pri; + int rv; + size_t sz; if (!prop_dictionary_get_string(env, "laggport", )) { if (lagg_debug) @@ -410,11 +408,15 @@ setlaggport(prop_dictionary_t env, prop_ return -1; } - memset(&_req, 0, sizeof(_req)); - req = (struct lagg_req *)&_req; - rp = >lrq_reqports[0]; - req->lrq_nports = 1; + sz = sizeof(*req) + sizeof(req->lrq_reqports[0]) * 1; + req = calloc(1, sz); + if (req == NULL) { + errno = ENOBUFS; + return -1; + } + req->lrq_nports = 1; + rp = >lrq_reqports[0]; strlcpy(rp->rp_portname, ifname, sizeof(rp->rp_portname)); ioc = LAGGIOC_NOCMD; @@ -433,15 +435,16 @@ setlaggport(prop_dictionary_t env, prop_ if (ioc != LAGGIOC_NOCMD) { req->lrq_ioctl = ioc; - if (indirect_ioctl(env, SIOCSLAGG, req) == -1) { - if (lagg_debug) { -warn("cmd=%d", ioc); - } - return -1; - } + rv = indirect_ioctl(env, SIOCSLAGG, req); + if (lagg_debug && rv == -1) + warn("cmd=%d", ioc); + } else { + rv = 0; } - return 0; + free(req); + + return rv; } static int
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: yamaguchi Date: Tue Apr 9 08:53:08 UTC 2024 Modified Files: src/sbin/ifconfig: lagg.c Log Message: lagg(4): allocate memory for struct lagg_req by calloc(3) to fix build error on clang To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sbin/ifconfig/lagg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.