From: Roy Marples Date: Wed, 5 Feb 2014 13:18:58 +0000 (+0000) Subject: pidfd can be static now. X-Git-Tag: v6.3.0~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=623e5af3965a9967ceb1cb70c75df3c0dd514200;p=thirdparty%2Fdhcpcd.git pidfd can be static now. --- diff --git a/auth.c b/auth.c index d40410ad..0cfd95af 100644 --- 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++; diff --git a/dhcpcd.c b/dhcpcd.c index 60806123..cf2e4767 100644 --- 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; diff --git a/dhcpcd.h b/dhcpcd.h index 67fe6d1c..e16fec6c 100644 --- 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;