From 4d291508c2c24d058d0e00ca9588c6c81b24bc92 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 22 Jan 2011 14:20:42 -0600 Subject: Improve mbasename performance Rather than roll our own, use strrchr() instead, which glibc may have a better implementation than the simple iteration method we were using. Signed-off-by: Dan McGee --- src/pacman/query.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pacman/query.c') diff --git a/src/pacman/query.c b/src/pacman/query.c index dea309a0..f5993609 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -109,8 +109,8 @@ static int query_fileowner(alpm_list_t *targets) for(t = targets; t; t = alpm_list_next(t)) { int found = 0; filename = strdup(alpm_list_getdata(t)); - char *bname, *dname, *rpath; - const char *root; + char *dname, *rpath; + const char *root, *bname; struct stat buf; alpm_list_t *i, *j; -- cgit v1.2.3