]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Reduce mallocs when printing pidfile
authorRoy Marples <roy@marples.name>
Thu, 7 Jan 2016 23:37:14 +0000 (23:37 +0000)
committerRoy Marples <roy@marples.name>
Thu, 7 Jan 2016 23:37:14 +0000 (23:37 +0000)
if-options.c

index ddf6aaf9b45edac23ec9a7c1343bfba382076bf5..de0c3ab724954e69d23d6e288d16903f5449c0bd 100644 (file)
@@ -2168,7 +2168,7 @@ read_config(struct dhcpcd_ctx *ctx,
        buflen = 0;
 
        /* Parse our embedded options file */
-       if (ifname == NULL) {
+       if (ifname == NULL && !(ctx->options & DHCPCD_PRINT_PIDFILE)) {
                /* Space for initial estimates */
 #if defined(INET) && defined(INITDEFINES)
                ifo->dhcp_override =