Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2021 00:28:01 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 065166c76a69 - stable/13 - setproctitle_internal(): remove kbuf local, it is write-only
Message-ID:  <202112060028.1B60S1g5084744@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=065166c76a69c239af27be30ddb689b7ccda135d

commit 065166c76a69c239af27be30ddb689b7ccda135d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-28 02:51:45 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-12-06 00:23:45 +0000

    setproctitle_internal(): remove kbuf local, it is write-only
    
    (cherry picked from commit 412fd7a34cf99727f0aa5c70fd694cf06094d831)
---
 lib/libc/gen/setproctitle.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/libc/gen/setproctitle.c b/lib/libc/gen/setproctitle.c
index 3f858952255c..08612e99d9bb 100644
--- a/lib/libc/gen/setproctitle.c
+++ b/lib/libc/gen/setproctitle.c
@@ -62,7 +62,7 @@ setproctitle_internal(const char *fmt, va_list ap)
 	static struct ps_strings *ps_strings;
 	static char *buf = NULL;
 	static char *obuf = NULL;
-	static char **oargv, *kbuf;
+	static char **oargv;
 	static int oargc = -1;
 	static char *nargv[2] = { NULL, NULL };
 	char **nargvp;
@@ -103,12 +103,10 @@ setproctitle_internal(const char *fmt, va_list ap)
 
 		nargvp = nargv;
 		nargc = 1;
-		kbuf = buf;
 	} else if (*obuf != '\0') {
 		/* Idea from NetBSD - reset the title on fmt == NULL */
 		nargvp = oargv;
 		nargc = oargc;
-		kbuf = obuf;
 	} else
 		/* Nothing to restore */
 		return (NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112060028.1B60S1g5084744>