From 628aed7218740590ae9043da02fdc85cee84dfe3 Mon Sep 17 00:00:00 2001 From: emaste Date: Tue, 12 Apr 2016 22:59:20 +0000 Subject: Remove PS_STRINGS fallback from setproctitle In r103767 the kern.ps_strings sysctl was added as the preferred way to locate the ps_strings struct and is available in any FreeBSD release supported within the last decade. Reviewed by: kib --- lib/libc/gen/setproctitle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/gen/setproctitle.c') diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c index 9dff328..2cde895 100644 --- a/lib/libc/gen/setproctitle.c +++ b/lib/libc/gen/setproctitle.c @@ -134,7 +134,7 @@ setproctitle(const char *fmt, ...) len = sizeof(ul_ps_strings); if (sysctlbyname("kern.ps_strings", &ul_ps_strings, &len, NULL, 0) == -1) - ul_ps_strings = PS_STRINGS; + return; ps_strings = (struct ps_strings *)ul_ps_strings; } -- cgit v1.1