Date: Sat, 7 Jan 2017 08:24:50 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r311588 - stable/11/contrib/netbsd-tests/lib/libc/sys Message-ID: <201701070824.v078OoQa073244@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 7 08:24:49 2017 New Revision: 311588 URL: https://svnweb.freebsd.org/changeset/base/311588 Log: MFC r311242: listen_low_port: check for errors from socket(2) before continuing CID: 976778 Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c Sat Jan 7 08:18:25 2017 (r311587) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_listen.c Sat Jan 7 08:24:49 2017 (r311588) @@ -110,6 +110,9 @@ ATF_TC_BODY(listen_low_port, tc) int sd, val; sd = socket(AF_INET, SOCK_STREAM, 0); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(sd != -1, "socket failed: %s", strerror(errno)); +#endif val = IP_PORTRANGE_LOW; if (setsockopt(sd, IPPROTO_IP, IP_PORTRANGE, &val,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070824.v078OoQa073244>