wireless: dynamically enable/disable virtual interfaces base on network interface...
[project/netifd.git] / main.c
diff --git a/main.c b/main.c
index 0fb72b344f2317f6cb9745f433952ce2c69b7f3f..ec7b1be036337ec61c9fd04eac05cc0691193859 100644 (file)
--- a/main.c
+++ b/main.c
@@ -64,6 +64,7 @@ netifd_delete_process(struct netifd_process *proc)
 }
 
 void
+__attribute__((format(printf, 2, 0)))
 netifd_log_message(int priority, const char *format, ...)
 {
        va_list vl;
@@ -129,7 +130,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
@@ -233,10 +235,10 @@ static int usage(const char *progname)
                " -p <path>:            Path to netifd addons (default: %s)\n"
                " -c <path>:            Path to UCI configuration\n"
                " -h <path>:            Path to the hotplug script\n"
+               "                       (default: "DEFAULT_HOTPLUG_PATH")\n"
                " -r <path>:            Path to resolv.conf\n"
                " -l <level>:           Log output level (default: %d)\n"
                " -S:                   Use stderr instead of syslog for log messages\n"
-               "                       (default: "DEFAULT_HOTPLUG_PATH")\n"
                "\n", progname, main_path, DEFAULT_LOG_LEVEL);
 
        return 1;
@@ -303,8 +305,8 @@ int main(int argc, char **argv)
                        break;
                case 'l':
                        log_level = atoi(optarg);
-                       if (log_level >= ARRAY_SIZE(log_class))
-                               log_level = ARRAY_SIZE(log_class) - 1;
+                       if (log_level >= (int)ARRAY_SIZE(log_class))
+                               log_level = (int)ARRAY_SIZE(log_class) - 1;
                        break;
 #ifndef DUMMY_MODE
                case 'S':