From fc8f39c0dad332a7c909d5a379eb01d594cf3594 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Thu, 19 Feb 2009 21:40:10 +0100 Subject: [PATCH] strip_path_suffix(): fix comment Signed-off-by: Johannes Schindelin --- path.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/path.c b/path.c index 719be21e75..b31d0e1fb1 100644 --- a/path.c +++ b/path.c @@ -466,7 +466,11 @@ static inline int chomp_trailing_dir_sep(const char *path, int len) return len; } -/* sets prefix if the suffix matches */ +/* + * If path ends with suffix (complete path components), returns the + * part before suffix (sans trailing directory separators). + * Otherwise returns NULL. + */ char *strip_path_suffix(const char *path, const char *suffix) { int path_len = strlen(path), suffix_len = strlen(suffix);