netifd: Do not return values in void function
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Feb 2023 20:07:14 +0000 (21:07 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 19 Feb 2023 15:09:56 +0000 (16:09 +0100)
These two functions return void, do not try to return a parameter.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
interface-event.c
main.c

index a40f6dc883d3a3654d73d0592cd7eb65c2a8de85..b03bfbcac7f055b5cc8e9a3d5898fed7522ae51f 100644 (file)
@@ -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 874dc8bd2215edf38016539801343e4f4e07f2de..e5260b5eafa9324861da347472572eee0ddab714 100644 (file)
--- 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