aboutsummaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/procps.c')
-rw-r--r--libbb/procps.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libbb/procps.c b/libbb/procps.c
index 32dae43e3..5a4ea59d0 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -284,7 +284,6 @@ int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total,
284} 284}
285#endif 285#endif
286 286
287void BUG_comm_size(void);
288procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags) 287procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags)
289{ 288{
290 if (!sp) 289 if (!sp)
@@ -386,8 +385,7 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags)
386 /*if (!cp || cp[1] != ' ') 385 /*if (!cp || cp[1] != ' ')
387 continue;*/ 386 continue;*/
388 cp[0] = '\0'; 387 cp[0] = '\0';
389 if (sizeof(sp->comm) < 16) 388 BUILD_BUG_ON(sizeof(sp->comm) < 16);
390 BUG_comm_size();
391 comm1 = strchr(buf, '('); 389 comm1 = strchr(buf, '(');
392 /*if (comm1)*/ 390 /*if (comm1)*/
393 safe_strncpy(sp->comm, comm1 + 1, sizeof(sp->comm)); 391 safe_strncpy(sp->comm, comm1 + 1, sizeof(sp->comm));