summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-22 21:20:42 +0100
committerDan McGee <dan@archlinux.org>2011-01-22 23:34:42 +0100
commit4d291508c2c24d058d0e00ca9588c6c81b24bc92 (patch)
tree2f37718b5fcc1a70eed069f459b5548a73eb7465 /src/pacman/query.c
parentd16a5ae7ddf358c45280a56bc81ed67841a7476f (diff)
downloadpacman-4d291508c2c24d058d0e00ca9588c6c81b24bc92.tar.gz
pacman-4d291508c2c24d058d0e00ca9588c6c81b24bc92.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r--src/pacman/query.c4
1 files changed, 2 insertions, 2 deletions
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;