From ac48e72bf6f9f491824e2de59a035c93aab8f81b Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 12 Dec 2017 15:56:31 +0100 Subject: Fix some minor issues --- sysdep/bsd/krt-sock.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sysdep/bsd/krt-sock.c') diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c index 604cd510..0a52cfbd 100644 --- a/sysdep/bsd/krt-sock.c +++ b/sysdep/bsd/krt-sock.c @@ -74,11 +74,11 @@ const int rt_default_ecmp = 0; /* Dynamic max number of tables */ -int krt_max_tables; +uint krt_max_tables; #ifdef KRT_USE_SYSCTL_NET_FIBS -static int +static uint krt_get_max_tables(void) { int fibs; @@ -90,7 +90,11 @@ krt_get_max_tables(void) return 1; } - return MIN(fibs, KRT_MAX_TABLES); + /* Should not happen */ + if (fibs < 1) + return 1; + + return (uint) MIN(fibs, KRT_MAX_TABLES); } #else -- cgit v1.2.3