summaryrefslogtreecommitdiffstats
path: root/src/pacman/package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-05-14 09:16:55 +0200
committerDan McGee <dan@archlinux.org>2007-05-14 09:16:55 +0200
commit2bcecbd62cb2bda681a3aba46bb0bbf690ba7219 (patch)
treecc7f9d60e04c65453527354bbd18312a9c323ed4 /src/pacman/package.c
parent5c930c318e7b80af3a322ddc7ddf9fe100e9c16b (diff)
downloadpacman-2bcecbd62cb2bda681a3aba46bb0bbf690ba7219.tar.gz
pacman-2bcecbd62cb2bda681a3aba46bb0bbf690ba7219.tar.xz
Remove unnecessary casts on malloc and elsewhere
We had many unnecessary casts, most of them dealing with malloc and other memory allocations. The variable type should take care of it; no need to do it explicitly. In addition, I caught a const error while removing the casts. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/package.c')
-rw-r--r--src/pacman/package.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 03c2d88c..c91384d9 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -111,15 +111,15 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
*/
void dump_pkg_sync(pmpkg_t *pkg, const char *treename)
{
- char *descheader, *md5sum, *sha1sum;
+ const char *descheader, *md5sum, *sha1sum;
if(pkg == NULL) {
return;
}
descheader = _("Description : ");
- md5sum = (char *)alpm_pkg_get_md5sum(pkg);
- sha1sum = (char *)alpm_pkg_get_sha1sum(pkg);
+ md5sum = alpm_pkg_get_md5sum(pkg);
+ sha1sum = alpm_pkg_get_sha1sum(pkg);
printf(_("Repository : %s\n"), treename);
printf(_("Name : %s\n"), (char *)alpm_pkg_get_name(pkg));