Browse Source

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 <hauke@hauke-m.de>
Hauke Mehrtens 1 year ago
parent
commit
8ebf033176
2 changed files with 6 additions and 3 deletions
  1. 4 2
      interface-event.c
  2. 2 1
      main.c

+ 4 - 2
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;

+ 2 - 1
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