summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 20:23:41 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:16 +0100
commit97b5d752d7af198d0b2881b5a3b2e61f2b4921e5 (patch)
tree1b29dd2d5a576a130532ebd349e66994ae196853 /lib
parent*: remove unnecessary semicolon from switches (diff)
downloadfrr-97b5d752d7af198d0b2881b5a3b2e61f2b4921e5.tar.xz
frr-97b5d752d7af198d0b2881b5a3b2e61f2b4921e5.zip
*: use array_size instead of raw division
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/imsg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/imsg.c b/lib/imsg.c
index 935d13772..57e70617d 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;