ccanlint: fix -x core dump
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 23 Nov 2010 01:36:31 +0000 (12:06 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 23 Nov 2010 01:36:31 +0000 (12:06 +1030)
This wasn't fixed when we converted to ccan/opt in 8d70667887.

Unfortunately, unistd.h defines optarg, so the compiler didn't catch
this.

tools/ccanlint/ccanlint.c

index e70eca1b342f58e418df333be223b1be0c123d5c..58ca1f537d7d0d3f5d75058b534edac722016d3c 100644 (file)
@@ -318,7 +318,7 @@ static char *keep_test(const char *testname, void *unused)
 
 static char *skip_test(const char *testname, void *unused)
 {
-       btree_insert(cmdline_exclude, optarg);
+       btree_insert(cmdline_exclude, testname);
        return NULL;
 }