Skip to content

Commit

Permalink
One less magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
Freaky committed Feb 26, 2020
1 parent fa29168 commit c3c1f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checkrestart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c3c1f2d

Please sign in to comment.