]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
pidfd can be static now.
authorRoy Marples <roy@marples.name>
Wed, 5 Feb 2014 13:18:58 +0000 (13:18 +0000)
committerRoy Marples <roy@marples.name>
Wed, 5 Feb 2014 13:18:58 +0000 (13:18 +0000)
auth.c
dhcpcd.c
dhcpcd.h

diff --git a/auth.c b/auth.c
index d40410ade116b3a94e5a490691dc1e3b3da1d713..0cfd95af58b52180b17e380f12050587216dc5e9 100644 (file)
--- a/auth.c
+++ b/auth.c
@@ -392,8 +392,10 @@ get_next_rdm_monotonic_counter(void)
                line = get_line(fp);
                if (line == NULL)
                        rdm = 0; /* truncated? report error? */
-               else
+               else {
                        rdm = strtoull(line, &ep, 0);
+                       free(line);
+               }
        }
 
        rdm++;
index 60806123fcba0c233a68e17f7a39127789620f49..cf2e47672a67aa8fe4e60b3d73d44abbd776e786 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -68,7 +68,6 @@ const char dhcpcd_copyright[] = "Copyright (c) 2006-2014 Roy Marples";
 
 struct if_head *ifaces = NULL;
 char vendor[VENDORCLASSID_MAX_LEN];
-int pidfd = -1;
 struct if_options *if_options = NULL;
 int ifac = 0;
 char **ifav = NULL;
@@ -86,6 +85,7 @@ const int handle_sigs[] = {
        0
 };
 
+static int pidfd = -1;
 static char *cffile;
 static int linkfd = -1;
 static char **ifv;
index 67fe6d1c11497de722b6c9aec8e3e468b8c0c1ac..e16fec6c5dd4882f8bce682088a819509b67a74b 100644 (file)
--- a/dhcpcd.h
+++ b/dhcpcd.h
@@ -71,7 +71,6 @@ extern TAILQ_HEAD(if_head, interface) *ifaces;
 
 extern char vendor[VENDORCLASSID_MAX_LEN];
 extern sigset_t dhcpcd_sigset;
-extern int pidfd;
 extern int ifac;
 extern char **ifav;
 extern int ifdc;