diff options
Diffstat (limited to 'libbb/procps.c')
-rw-r--r-- | libbb/procps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 053f7d225..946f569f5 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -184,7 +184,7 @@ procps_status_t* procps_scan(procps_status_t* sp, int flags) | |||
184 | 184 | ||
185 | sp->tty_str[0] = '?'; | 185 | sp->tty_str[0] = '?'; |
186 | /* sp->tty_str[1] = '\0'; - done by memset */ | 186 | /* sp->tty_str[1] = '\0'; - done by memset */ |
187 | if (tty >= 0) /* tty field of "-1" means "no tty" */ | 187 | if (tty) /* tty field of "0" means "no tty" */ |
188 | snprintf(sp->tty_str, sizeof(sp->tty_str), "%u,%u", | 188 | snprintf(sp->tty_str, sizeof(sp->tty_str), "%u,%u", |
189 | (tty >> 8) & 0xfff, /* major */ | 189 | (tty >> 8) & 0xfff, /* major */ |
190 | (tty & 0xff) | ((tty >> 12) & 0xfff00)); | 190 | (tty & 0xff) | ((tty >> 12) & 0xfff00)); |