]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Mark functions as _noreturn.
authorRoy Marples <roy@marples.name>
Fri, 5 Sep 2008 11:46:03 +0000 (11:46 +0000)
committerRoy Marples <roy@marples.name>
Fri, 5 Sep 2008 11:46:03 +0000 (11:46 +0000)
common.h
dhcpcd.c
eloop.c

index a9715d635796360c7efce37453be36ebfcd44e72..82adbada264793fbb4fd2ed92fd6aa0548341f6f 100644 (file)
--- a/common.h
+++ b/common.h
        } while (0 /* CONSTCOND */);
 
 #if __GNUC__ > 2 || defined(__INTEL_COMPILER)
-# define _unused __attribute__((__unused__))
+# define _noreturn __attribute__((__noreturn__))
+# define _unused    __attribute__((__unused__))
 #else
+# define _noreturn
 # define _unused
 #endif
 
index 3094fd2bb61fc8388d58b99dd7d04b0b19a3cef1..acbcd54b4f8f795a3c6343070edb653854851445 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -153,7 +153,7 @@ cleanup(void)
        }
 }
 
-void
+_noreturn void
 handle_exit_timeout(_unused void *arg)
 {
        logger(LOG_ERR, "timed out");
diff --git a/eloop.c b/eloop.c
index 981d8eefc259cf38129dafeab764203c02ebd217..7655f5a78e391aec9b9431ce280412323633477d 100644 (file)
--- a/eloop.c
+++ b/eloop.c
@@ -261,7 +261,7 @@ delete_timeout(void (*callback)(void *), void *arg)
        }
 }
 
-void
+_noreturn void
 start_eloop(void)
 {
        int msecs, n;
@@ -326,7 +326,7 @@ start_eloop(void)
                                get_monotonic(&now);
                                continue;
                        }
-                       logger(LOG_ERR, "poll: %s", strerror(errno));
+                       logger(LOG_ERR, "poll: %m");
                        exit(EXIT_FAILURE);
                }