summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2022-02-24 01:43:48 -0500
committerGitHub <noreply@github.com>2022-02-24 01:43:48 -0500
commit7bf63db79b7848b73e1cef49f3496038644bea16 (patch)
tree2c95921d910689673348e60f9614de7d9d00c4e7 /zebra/kernel_socket.c
parentca6c97340b013e140c0cb31737858f7c672b7dfb (diff)
parentcc9f21da2218d95567eff1501482ce58e6600f54 (diff)
Merge pull request #10632 from donaldsharp/thread_return_null
*: Change thread->func to return void instead of int
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index b9228072e5..53b7a21d32 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -1292,7 +1292,7 @@ static void rtmsg_debug(struct rt_msghdr *rtm)
#endif /* RTAX_MAX */
/* Kernel routing table and interface updates via routing socket. */
-static int kernel_read(struct thread *thread)
+static void kernel_read(struct thread *thread)
{
int sock;
int nbytes;
@@ -1356,11 +1356,11 @@ static int kernel_read(struct thread *thread)
if (errno != EAGAIN && errno != EWOULDBLOCK)
flog_err_sys(EC_LIB_SOCKET, "routing socket error: %s",
safe_strerror(errno));
- return 0;
+ return;
}
if (nbytes == 0)
- return 0;
+ return;
thread_add_read(zrouter.master, kernel_read, NULL, sock, NULL);
@@ -1377,7 +1377,7 @@ static int kernel_read(struct thread *thread)
zlog_debug(
"kernel_read: rtm->rtm_msglen %d, nbytes %d, type %d",
rtm->rtm_msglen, nbytes, rtm->rtm_type);
- return -1;
+ return;
}
switch (rtm->rtm_type) {
@@ -1403,7 +1403,6 @@ static int kernel_read(struct thread *thread)
zlog_debug("Unprocessed RTM_type: %d", rtm->rtm_type);
break;
}
- return 0;
}
/* Make routing socket. */