When figuring out whom to call and if we actually can legally
call into the handler array actually use the number of elements
in the array instead of the size of the array.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
struct stream *msg,
struct zebra_vrf *zvrf)
{
- if (hdr->command > sizeof(zserv_handlers)
+ if (hdr->command > array_size(zserv_handlers)
|| zserv_handlers[hdr->command] == NULL)
zlog_info("Zebra received unknown command %d", hdr->command);
else