summaryrefslogtreecommitdiff
path: root/libbb/procps.c
diff options
context:
space:
mode:
authorDenys Vlasenko2015-10-13 14:50:20 +0200
committerDenys Vlasenko2015-10-13 14:50:20 +0200
commitab3964db4e75e34f6f9347406c5fd2bced04f2dd (patch)
tree92113e4a008338ed8534858db97d3a5e09dc210b /libbb/procps.c
parentf7ad927c2059ef9cd1cd6befeb43f26b92f6369f (diff)
downloadbusybox-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.zip
busybox-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.tar.gz
libbb: introduce kernel-style BUILD_BUG_ON()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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 71ad071..05eefe0 100644
--- a/libbb/procps.c
+++ b/libbb/procps.c
@@ -283,7 +283,6 @@ int FAST_FUNC procps_read_smaps(pid_t pid, struct smaprec *total,
}
#endif
-void BUG_comm_size(void);
procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags)
{
if (!sp)
@@ -385,8 +384,7 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags)
/*if (!cp || cp[1] != ' ')
continue;*/
cp[0] = '\0';
- if (sizeof(sp->comm) < 16)
- BUG_comm_size();
+ BUILD_BUG_ON(sizeof(sp->comm) < 16);
comm1 = strchr(buf, '(');
/*if (comm1)*/
safe_strncpy(sp->comm, comm1 + 1, sizeof(sp->comm));