projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0fd390
)
ccanlint: don't crash if given bad directory name.
author
Rusty Russell
<rusty@rustcorp.com.au>
Sun, 31 Mar 2013 06:40:50 +0000
(17:10 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Sun, 31 Mar 2013 06:40:50 +0000
(17:10 +1030)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
tools/ccanlint/ccanlint.c
patch
|
blob
|
history
diff --git
a/tools/ccanlint/ccanlint.c
b/tools/ccanlint/ccanlint.c
index c0ab02768c4664f4a6940ffad6358405ca83251c..7747a4976e7cd1ea748191ff5246480806cb027b 100644
(file)
--- a/
tools/ccanlint/ccanlint.c
+++ b/
tools/ccanlint/ccanlint.c
@@
-681,6
+681,9
@@
int main(int argc, char *argv[])
for (i = 1; i < argc; i++) {
dir = path_canon(NULL,
take(path_join(NULL, cwd, argv[i])));
+ if (!dir)
+ err(1, "Cannot get canonical name of '%s'",
+ argv[i]);
prefix = path_join(NULL, ccan_dir, "ccan");
prefix = path_rel(NULL, take(prefix), dir);