diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/messages.c | 2 | ||||
-rw-r--r-- | libbb/procps.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libbb/messages.c b/libbb/messages.c index 12a165a..3febe76 100644 --- a/libbb/messages.c +++ b/libbb/messages.c @@ -54,7 +54,7 @@ WTMP_FILE; # error unknown path to wtmp file #endif -char bb_common_bufsiz1[BUFSIZ+1]; +char bb_common_bufsiz1[(BUFSIZ > 256*sizeof(void*) ? BUFSIZ : 256*sizeof(void*)) + 1]; struct globals; /* Make it reside in R/W memory: */ diff --git a/libbb/procps.c b/libbb/procps.c index 053f7d2..946f569 100644 --- a/libbb/procps.c +++ b/libbb/procps.c @@ -184,7 +184,7 @@ procps_status_t* procps_scan(procps_status_t* sp, int flags) sp->tty_str[0] = '?'; /* sp->tty_str[1] = '\0'; - done by memset */ - if (tty >= 0) /* tty field of "-1" means "no tty" */ + if (tty) /* tty field of "0" means "no tty" */ snprintf(sp->tty_str, sizeof(sp->tty_str), "%u,%u", (tty >> 8) & 0xfff, /* major */ (tty & 0xff) | ((tty >> 12) & 0xfff00)); |