[PATCH netifd 3/5] netifd: Do not return values in void function
Hauke Mehrtens
hauke at hauke-m.de
Sun Feb 19 07:20:25 PST 2023
These two functions return void, do not try to return a parameter.
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
interface-event.c | 6 ++++--
main.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
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
--
2.39.1
More information about the openwrt-devel
mailing list