diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-13 14:50:20 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-13 14:50:20 +0200 |
commit | ab3964db4e75e34f6f9347406c5fd2bced04f2dd (patch) | |
tree | 92113e4a008338ed8534858db97d3a5e09dc210b /networking/isrv.c | |
parent | f7ad927c2059ef9cd1cd6befeb43f26b92f6369f (diff) | |
download | busybox-w32-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.tar.gz busybox-w32-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.tar.bz2 busybox-w32-ab3964db4e75e34f6f9347406c5fd2bced04f2dd.zip |
libbb: introduce kernel-style BUILD_BUG_ON()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/isrv.c')
-rw-r--r-- | networking/isrv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/networking/isrv.c b/networking/isrv.c index 1c6491edd..3673db715 100644 --- a/networking/isrv.c +++ b/networking/isrv.c | |||
@@ -194,7 +194,6 @@ static void handle_accept(isrv_state_t *state, int fd) | |||
194 | remove_peer(state, n); /* unsuccesful peer start */ | 194 | remove_peer(state, n); /* unsuccesful peer start */ |
195 | } | 195 | } |
196 | 196 | ||
197 | void BUG_sizeof_fd_set_is_strange(void); | ||
198 | static void handle_fd_set(isrv_state_t *state, fd_set *fds, int (*h)(int, void **)) | 197 | static void handle_fd_set(isrv_state_t *state, fd_set *fds, int (*h)(int, void **)) |
199 | { | 198 | { |
200 | enum { LONG_CNT = sizeof(fd_set) / sizeof(long) }; | 199 | enum { LONG_CNT = sizeof(fd_set) / sizeof(long) }; |
@@ -203,8 +202,7 @@ static void handle_fd_set(isrv_state_t *state, fd_set *fds, int (*h)(int, void * | |||
203 | /* need to know value at _the beginning_ of this routine */ | 202 | /* need to know value at _the beginning_ of this routine */ |
204 | int fd_cnt = FD_COUNT; | 203 | int fd_cnt = FD_COUNT; |
205 | 204 | ||
206 | if (LONG_CNT * sizeof(long) != sizeof(fd_set)) | 205 | BUILD_BUG_ON(LONG_CNT * sizeof(long) != sizeof(fd_set)); |
207 | BUG_sizeof_fd_set_is_strange(); | ||
208 | 206 | ||
209 | fds_pos = 0; | 207 | fds_pos = 0; |
210 | while (1) { | 208 | while (1) { |