aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2021-11-28 02:51:45 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2021-12-06 00:23:45 +0000
commit065166c76a69c239af27be30ddb689b7ccda135d (patch)
tree7e4bb576b84be5e3f2cda5b799bdd6eab64d4c7f
parent5298739f2d9fd8b3d1196fcf019bb39ec303e84e (diff)
-rw-r--r--lib/libc/gen/setproctitle.c4
1 files changed, 1 insertions, 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);