From: Roy Marples Date: Sat, 17 Jan 2009 00:43:08 +0000 (+0000) Subject: Test length, not null. X-Git-Tag: v5.0.0~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c008cfb190b89a7b2064ec6e81063744eb22693f;p=thirdparty%2Fdhcpcd.git Test length, not null. --- 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));