]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Make code cleaner with UNUSED
authorRoy Marples <roy@marples.name>
Thu, 30 Apr 2015 10:25:16 +0000 (10:25 +0000)
committerRoy Marples <roy@marples.name>
Thu, 30 Apr 2015 10:25:16 +0000 (10:25 +0000)
script.c

index ff2c69618e227f7b6ec4867f2df9d59a281caafc..918f700c4eab7a9941e9661ee5485d9e27420941 100644 (file)
--- a/script.c
+++ b/script.c
@@ -86,14 +86,8 @@ if_printoptions(void)
                printf(" -  %s\n", *p);
 }
 
-#ifdef USE_SIGNALS
-#define U
-#else
-#define U __unused
-#endif
 static int
-exec_script(U const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env)
-#undef U
+exec_script(const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env)
 {
        pid_t pid;
        posix_spawnattr_t attr;
@@ -101,6 +95,8 @@ exec_script(U const struct dhcpcd_ctx *ctx, char *const *argv, char *const *env)
 #ifdef USE_SIGNALS
        short flags;
        sigset_t defsigs;
+#else
+       UNUSED(ctx);
 #endif
 
        /* posix_spawn is a safe way of executing another image