summaryrefslogtreecommitdiffstats
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-05 23:34:33 +0200
committerDan McGee <dan@archlinux.org>2007-06-05 23:34:33 +0200
commitf7912e9dc6be71b177d546da0f8d005e7b4af9e8 (patch)
tree14f9c7be0757de98d2325b3623eac2a45a438a16 /src/pacman/sync.c
parent4906b76c85bc93c4a86dfa8449d58b55ede30425 (diff)
downloadpacman-f7912e9dc6be71b177d546da0f8d005e7b4af9e8.tar.gz
pacman-f7912e9dc6be71b177d546da0f8d005e7b4af9e8.tar.xz
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/sync.c')
-rw-r--r--src/pacman/sync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 92a1607a..fa99797c 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -572,7 +572,8 @@ int pacman_sync(alpm_list_t *targets)
found++;
printf(_(":: group %s:\n"), targ);
/* remove dupe entries in case a package exists in multiple repos */
- alpm_list_t *pkgs = alpm_list_remove_dupes(alpm_grp_get_pkgs(grp));
+ const alpm_list_t *grppkgs = alpm_grp_get_pkgs(grp);
+ alpm_list_t *pkgs = alpm_list_remove_dupes(grppkgs);
list_display(" ", pkgs);
if(yesno(_(":: Install whole content? [Y/n] "))) {
for(k = pkgs; k; k = alpm_list_next(k)) {