summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-17 00:43:08 +0000
committerRoy Marples <roy@marples.name>2009-01-17 00:43:08 +0000
commitc008cfb190b89a7b2064ec6e81063744eb22693f (patch)
tree5643fda167eb8cf4bd4cd6dc146540aa8419ae16 /dhcpcd.c
parent97d81cf599ffbb8747377f8b3f15986171ad4f87 (diff)
downloaddhcpcd-c008cfb190b89a7b2064ec6e81063744eb22693f.tar.xz
Test length, not null.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 58d1b882..4e120c64 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1126,7 +1126,7 @@ handle_args(struct fd_list *fd, int argc, char **argv)
return 0;
} else if (strcmp(*argv, "--getinterfaces") == 0) {
len = 0;
- if (argv[1] == NULL) {
+ if (argc == 1) {
for (ifp = ifaces; ifp; ifp = ifp->next)
len++;
write(fd->fd, &len, sizeof(len));