fix read_cmdline API and a small buglet where "[comm]" may be too narrow
function old new delta func_args 25 26 +1 read_cmdline 119 114 -5 display_process_list 1462 1447 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-20) Total: -19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -186,7 +186,7 @@ static void func_comm(char *buf, int size, const procps_status_t *ps)
|
||||
|
||||
static void func_args(char *buf, int size, const procps_status_t *ps)
|
||||
{
|
||||
read_cmdline(buf, size, ps->pid, ps->comm);
|
||||
read_cmdline(buf, size+1, ps->pid, ps->comm);
|
||||
}
|
||||
|
||||
static void func_pid(char *buf, int size, const procps_status_t *ps)
|
||||
|
||||
Reference in New Issue
Block a user