Skip to content

Commit

Permalink
I am not paid by the line
Browse files Browse the repository at this point in the history
  • Loading branch information
Freaky committed Apr 20, 2020
1 parent 6003a09 commit 040edfe
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions checkrestart.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ static void
needsrestart(const struct kinfo_proc *proc, const enum Reason reason, const char *args)
{
char fmtbuf[sizeof("{:arguments/%.4294967295s}\n")];
const char *why;
int col, width;

if (needheader) {
Expand All @@ -150,14 +149,7 @@ needsrestart(const struct kinfo_proc *proc, const enum Reason reason, const char
col += xo_emit("{e:uid/%d/%d}", proc->ki_uid);
col += xo_emit("{w:user/%-12.12s/%s}", user_getname(proc->ki_uid));
col += xo_emit("{w:command/%-12.12s/%s}", proc->ki_comm);

if (reason == MissingExe) {
why = "bin";
} else {
why = ".so";
}

col += xo_emit("{w:why/%-3s/%s}", why);
col += xo_emit("{w:why/%-3s/%s}", reason == MissingExe ? "bin" : ".so");

if (termwidth && xo_get_style(NULL) == XO_STYLE_TEXT) {
width = MAX(termwidth - col, (int)sizeof("ARGUMENTS") - 1);
Expand Down

0 comments on commit 040edfe

Please sign in to comment.