diff options
| author | Roy Marples <roy@marples.name> | 2009-01-17 00:43:08 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-01-17 00:43:08 +0000 |
| commit | c008cfb190b89a7b2064ec6e81063744eb22693f (patch) | |
| tree | 5643fda167eb8cf4bd4cd6dc146540aa8419ae16 /dhcpcd.c | |
| parent | 97d81cf599ffbb8747377f8b3f15986171ad4f87 (diff) | |
| download | dhcpcd-c008cfb190b89a7b2064ec6e81063744eb22693f.tar.xz | |
Test length, not null.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |
