diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-12 15:56:31 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-12 15:57:14 +0100 |
commit | ac48e72bf6f9f491824e2de59a035c93aab8f81b (patch) | |
tree | a6847c5a4996ff781235f79329e960ee6d2fcd85 /sysdep/bsd/krt-sock.c | |
parent | cb5df823acdc54f94b0b85094cb59ac68c83c33a (diff) |
Fix some minor issues
Diffstat (limited to 'sysdep/bsd/krt-sock.c')
-rw-r--r-- | sysdep/bsd/krt-sock.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 |