Mercurial > hg > dhcpcd
changeset 14:69389473e116 draft
Don't do if (foo) when foo is a char array and not a pointer
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Mon, 04 Dec 2006 16:09:18 +0000 |
| parents | 6288393e4e1f |
| children | 89fd24932c4d |
| files | Makefile configure.c interface.c |
| diffstat | 3 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Mon Dec 04 14:08:44 2006 +0000 +++ b/Makefile Mon Dec 04 16:09:18 2006 +0000 @@ -1,6 +1,6 @@ # Should work for both GNU make and BSD mke -VERSION = 3.0.2 +VERSION = 3.0.3_pre1 INSTALL ?= install CFLAGS ?= -Wall -O2 -pedantic -std=gnu99
--- a/configure.c Mon Dec 04 14:08:44 2006 +0000 +++ b/configure.c Mon Dec 04 16:09:18 2006 +0000 @@ -103,7 +103,7 @@ char resolvconf[PATH_MAX]; address_t *address; - memset (&resolvconf, 0, sizeof (resolvconf)); + memset (&buf, 0, sizeof (struct stat)); if (stat ("/sbin/resolvconf", &buf) == 0) { logger (LOG_DEBUG, "sending DNS information to resolvconf"); @@ -132,7 +132,7 @@ for (address = dhcp->dnsservers; address; address = address->next) fprintf (f, "nameserver %s\n", inet_ntoa (address->address)); - if (resolvconf) + if (buf.st_ino) { pclose (f); logger (LOG_DEBUG, "resolvconf completed");
