diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-01-17 16:19:13 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-01-17 16:19:13 +1030 |
commit | 2b46b6e66a6a842923640c881cd235166a4c9ad5 (patch) | |
tree | 41d5562c8fc7d5d7e364971d912299ffe5375598 | |
parent | 7bb7cd58c2d9df126dd6072e5f3bec1eb4dc916b (diff) |
ccanlint: fix trailing / in -d.
Before:
$ tools/ccanlint/ccanlint -d ccan/talloc/
Module's source code has no trailing whitespace (no_trailing_whitespace): FAIL
: Total score: 0/1
After:
$ tools/ccanlint/ccanlint -d ccan/talloc/
Module's source code has no trailing whitespace (no_trailing_whitespace): FAIL
talloc: Total score: 0/1
-rw-r--r-- | tools/ccanlint/ccanlint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 1b11803c..8acad932 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -499,6 +499,8 @@ int main(int argc, char *argv[]) if (dir[0] != '/') dir = talloc_asprintf_append(NULL, "%s/%s", base_dir, dir); + while (strends(dir, "/")) + dir[strlen(dir)-1] = '\0'; if (dir != base_dir) prefix = talloc_append_string(talloc_basename(NULL, dir), ": "); if (verbose >= 3) |