From c3c1f2d263bebcb6efe6c06162ed45f819aff5f8 Mon Sep 17 00:00:00 2001 From: Thomas Hurst Date: Wed, 26 Feb 2020 02:00:42 +0000 Subject: [PATCH] One less magic number --- checkrestart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checkrestart.c b/checkrestart.c index 5a036eb..03efee6 100644 --- a/checkrestart.c +++ b/checkrestart.c @@ -116,7 +116,7 @@ needsrestart(const struct kinfo_proc *proc, const char *updated, const char *com col += xo_emit("{:updated/%-7s/%s} ", updated); if (termwidth && xo_get_style(NULL) == XO_STYLE_TEXT) { - width = MAX(termwidth - col, 7); + width = MAX(termwidth - col, (int)sizeof("COMMAND") - 1); snprintf(fmtbuf, sizeof(fmtbuf), "{:command/%%-%d.%ds}\n", width, width); xo_emit(fmtbuf, command); } else {