diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 19:23:41 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 23:00:16 +0000 |
| commit | 97b5d752d7af198d0b2881b5a3b2e61f2b4921e5 (patch) | |
| tree | 1b29dd2d5a576a130532ebd349e66994ae196853 /lib/imsg.c | |
| parent | 5b94ec50249ae273132b010349592127df060fbb (diff) | |
*: use array_size instead of raw division
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/imsg.c')
| -rw-r--r-- | lib/imsg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/imsg.c b/lib/imsg.c index 935d137727..57e70617d2 100644 --- a/lib/imsg.c +++ b/lib/imsg.c @@ -18,6 +18,7 @@ #include <zebra.h> +#include "memory.h" #include "queue.h" #include "imsg.h" @@ -35,7 +36,7 @@ static int available_fds(unsigned int n) unsigned int i; int ret, fds[256]; - if (n > (sizeof(fds) / sizeof(fds[0]))) + if (n > (unsigned int)array_size(fds)) return (1); ret = 0; |
