diff options
author | Dan McGee <dan@archlinux.org> | 2007-06-05 17:34:33 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-06-05 17:34:33 -0400 |
commit | f7912e9dc6be71b177d546da0f8d005e7b4af9e8 (patch) | |
tree | 14f9c7be0757de98d2325b3623eac2a45a438a16 /src/pacman/query.c | |
parent | 4906b76c85bc93c4a86dfa8449d58b55ede30425 (diff) |
Const correctness!
Add some 'const' keywords all over the code to make it a bit more strict on
what you can and can't do with data. This is especially important when we
return pointers to the pacman frontend- ideally this would always be
untouchable data.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/query.c')
-rw-r--r-- | src/pacman/query.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pacman/query.c b/src/pacman/query.c index 3e993bf0..3863572f 100644 --- a/src/pacman/query.c +++ b/src/pacman/query.c @@ -182,7 +182,7 @@ static int query_group(alpm_list_t *targets) if(targets == NULL) { for(j = alpm_db_getgrpcache(db_local); j; j = alpm_list_next(j)) { pmgrp_t *grp = alpm_list_getdata(j); - alpm_list_t *p, *pkgnames; + const alpm_list_t *p, *pkgnames; const char *grpname; grpname = alpm_grp_get_name(grp); @@ -197,7 +197,7 @@ static int query_group(alpm_list_t *targets) package = alpm_list_getdata(i); pmgrp_t *grp = alpm_db_readgrp(db_local, package); if(grp) { - alpm_list_t *p, *pkgnames = alpm_grp_get_pkgs(grp); + const alpm_list_t *p, *pkgnames = alpm_grp_get_pkgs(grp); for(p = pkgnames; p; p = alpm_list_next(p)) { printf("%s %s\n", package, (char *)alpm_list_getdata(p)); } |