summaryrefslogtreecommitdiff
path: root/libarchive_fe
diff options
context:
space:
mode:
authorColin Percival <cperciva@daemonology.net>2011-08-16 14:04:19 -0400
committerColin Percival <cperciva@daemonology.net>2011-08-16 14:04:19 -0400
commitdfd14dc76f757c389bbb881197315b1041fd84d6 (patch)
tree9f6da9edcb9e497fa7ed164518d2f312ed0fb582 /libarchive_fe
parentcafcd565b46f1d8190e30a58bbee6c8444b39e68 (diff)
downloadlibarchive-dfd14dc76f757c389bbb881197315b1041fd84d6.tar.gz
Remove unnecessary call to strlen; we already know how long this string is.
Via: Tarsnap SVN-Revision: 3628
Diffstat (limited to 'libarchive_fe')
-rw-r--r--libarchive_fe/matching.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libarchive_fe/matching.c b/libarchive_fe/matching.c
index b2aba022..4ba60822 100644
--- a/libarchive_fe/matching.c
+++ b/libarchive_fe/matching.c
@@ -140,7 +140,7 @@ add_pattern(struct match **list, const char *pattern)
strcpy(match->pattern, pattern);
/* Both "foo/" and "foo" should match "foo/bar". */
if (len && match->pattern[len - 1] == '/')
- match->pattern[strlen(match->pattern)-1] = '\0';
+ match->pattern[len - 1] = '\0';
match->next = *list;
*list = match;
match->matches = 0;