summaryrefslogtreecommitdiffstats
path: root/src/pacman/query.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2008-03-30 23:14:44 +0200
committerDan McGee <dan@archlinux.org>2008-03-30 23:36:55 +0200
commit4b8ada818e21aae43b4f54f146ffa215fdb9213e (patch)
tree955662103fd246650084582644c82db4ccdc8691 /src/pacman/query.c
parent0d1263af260d9bb7c4aeb29d1637da5fdc1a949e (diff)
downloadpacman-4b8ada818e21aae43b4f54f146ffa215fdb9213e.tar.gz
pacman-4b8ada818e21aae43b4f54f146ffa215fdb9213e.tar.xz
Fix segfault on -Qs usage
This segfault creeped in as a result of commit bf867003. We were incorrectly assuming the group member of our package was a pmgrp_t list when in fact it is just a string list, which caused a segfault on any -Qs operation. Also slightly cleanup the -Ss code (which was originally correct unlike the -Qs code). 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 ca95aaa9..251c6faa 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -175,9 +175,9 @@ static int query_search(alpm_list_t *targets)
if (!config->quiet) {
if((grp = alpm_pkg_get_groups(pkg)) != NULL) {
- pmgrp_t *group = alpm_list_getdata(grp);
/* TODO handle multiple groups */
- printf(" (%s)", alpm_grp_get_name(group));
+ const char *group = alpm_list_getdata(grp);
+ printf(" (%s)", group);
}
/* we need a newline and initial indent first */