diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-02-06 06:19:29 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-02-06 06:19:29 +0000 |
commit | 607e6e2665e1b4701724fb538e54225685dd8ef5 (patch) | |
tree | e2f43741a23a27eebbda4bec489dc6909aa6024a /usr.bin/systat | |
parent | 96552a7d6a09dd6c47ccd1457dad5e030f712ec2 (diff) |
Use message_set() instead of direct assignment to curr_message
to avoid leaking the current help text.
from Anindya Mukherjee
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/engine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/systat/engine.c b/usr.bin/systat/engine.c index 6f035868f45..2a73f25c462 100644 --- a/usr.bin/systat/engine.c +++ b/usr.bin/systat/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.26 2021/01/09 12:49:09 jasper Exp $ */ +/* $OpenBSD: engine.c,v 1.27 2021/02/06 06:19:28 tb Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar <canacar@openbsd.org> * @@ -1139,7 +1139,7 @@ command_set(struct command *cmd, const char *init) cmdbuf[0] = 0; } } - curr_message = NULL; + message_set(NULL); curr_cmd = cmd; need_update = 1; return prev; @@ -1235,7 +1235,7 @@ keyboard(void) if (curr_message != NULL) { if (ch > 0) { - curr_message = NULL; + message_set(NULL); need_update = 1; } } |