From: Hauke Mehrtens Date: Sun, 12 Feb 2023 20:07:14 +0000 (+0100) Subject: netifd: Do not return values in void function X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=8ebf033176363dc4584e36ebbbc7f626ef31eb8f;p=project%2Fnetifd.git netifd: Do not return values in void function These two functions return void, do not try to return a parameter. Signed-off-by: Hauke Mehrtens --- diff --git a/interface-event.c b/interface-event.c index a40f6dc..b03bfbc 100644 --- a/interface-event.c +++ b/interface-event.c @@ -49,8 +49,10 @@ run_cmd(const char *ifname, const char *device, enum interface_event event, int pid; pid = fork(); - if (pid < 0) - return task_complete(NULL, -1); + if (pid < 0) { + task_complete(NULL, -1); + return; + } if (pid > 0) { task.pid = pid; diff --git a/main.c b/main.c index 874dc8b..e5260b5 100644 --- a/main.c +++ b/main.c @@ -129,7 +129,8 @@ netifd_process_cb(struct uloop_process *proc, int ret) np = container_of(proc, struct netifd_process, uloop); netifd_delete_process(np); - return np->cb(np, ret); + np->cb(np, ret); + return; } int