The branch stable/13 has been updated by kib:

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

commit 065166c76a69c239af27be30ddb689b7ccda135d
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-11-28 02:51:45 +0000
Commit:     Konstantin Belousov <[email protected]>
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);

Reply via email to