git: 412fd7a34cf9 - main - setproctitle_internal(): remove kbuf local, it is write-only
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Nov 2021 15:43:10 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=412fd7a34cf99727f0aa5c70fd694cf06094d831 commit 412fd7a34cf99727f0aa5c70fd694cf06094d831 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-11-28 02:51:45 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-11-29 15:39:51 +0000 setproctitle_internal(): remove kbuf local, it is write-only Sponsored by: The FreeBSD Foundation MFC after: 1 week --- 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);