summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2008-08-26 12:57:08 +0200
committerDan McGee <dan@archlinux.org>2009-01-13 06:59:30 +0100
commit4da70d800a25881f525498a451ae21b398a1d5b1 (patch)
tree6c3446c1ec32e5f8a8acd28d1b0b6bb82684eef7 /src
parenta888f377a5c805f1da24b556e6a4a9e3678d8eb3 (diff)
downloadpacman-4da70d800a25881f525498a451ae21b398a1d5b1.tar.gz
pacman-4da70d800a25881f525498a451ae21b398a1d5b1.tar.xz
Rename alpm_get_md5sum to alpm_compute_md5sum and alpm_dep_get_string to alpm_dep_compute_string
This patch introduces the following function name convention: _compute_ in function name: the return value must be freed. _get_ in function name: the return value must not be freed. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/package.c4
-rw-r--r--src/pacman/remove.c2
-rw-r--r--src/pacman/sync.c2
-rw-r--r--src/pacman/upgrade.c2
-rw-r--r--src/util/testdb.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/pacman/package.c b/src/pacman/package.c
index 71be2d8c..b23c577f 100644
--- a/src/pacman/package.c
+++ b/src/pacman/package.c
@@ -79,7 +79,7 @@ void dump_pkg_full(pmpkg_t *pkg, int level)
/* turn depends list into a text list */
for(i = alpm_pkg_get_depends(pkg); i; i = alpm_list_next(i)) {
pmdepend_t *dep = (pmdepend_t*)alpm_list_getdata(i);
- depstrings = alpm_list_add(depstrings, alpm_dep_get_string(dep));
+ depstrings = alpm_list_add(depstrings, alpm_dep_compute_string(dep));
}
if(level>0) {
@@ -176,7 +176,7 @@ void dump_pkg_backups(pmpkg_t *pkg)
snprintf(path, PATH_MAX-1, "%s%s", root, str);
/* if we find the file, calculate checksums, otherwise it is missing */
if(access(path, R_OK) == 0) {
- char *md5sum = alpm_get_md5sum(path);
+ char *md5sum = alpm_compute_md5sum(path);
if(md5sum == NULL) {
pm_fprintf(stderr, PM_LOG_ERROR,
diff --git a/src/pacman/remove.c b/src/pacman/remove.c
index 841a08bb..11bc157f 100644
--- a/src/pacman/remove.c
+++ b/src/pacman/remove.c
@@ -107,7 +107,7 @@ int pacman_remove(alpm_list_t *targets)
for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i);
pmdepend_t *dep = alpm_miss_get_dep(miss);
- char *depstring = alpm_dep_get_string(dep);
+ char *depstring = alpm_dep_compute_string(dep);
printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss),
depstring);
free(depstring);
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index e3a772de..d8a63481 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -640,7 +640,7 @@ static int sync_trans(alpm_list_t *targets)
for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i);
pmdepend_t *dep = alpm_miss_get_dep(miss);
- char *depstring = alpm_dep_get_string(dep);
+ char *depstring = alpm_dep_compute_string(dep);
printf(_(":: %s: requires %s\n"), alpm_miss_get_target(miss),
depstring);
free(depstring);
diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c
index c54b3ed7..2c996883 100644
--- a/src/pacman/upgrade.c
+++ b/src/pacman/upgrade.c
@@ -90,7 +90,7 @@ int pacman_upgrade(alpm_list_t *targets)
for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i);
pmdepend_t *dep = alpm_miss_get_dep(miss);
- char *depstring = alpm_dep_get_string(dep);
+ char *depstring = alpm_dep_compute_string(dep);
/* TODO indicate if the error was a virtual package or not:
* :: %s: requires %s, provided by %s
diff --git a/src/util/testdb.c b/src/util/testdb.c
index 8a66819f..cbff5784 100644
--- a/src/util/testdb.c
+++ b/src/util/testdb.c
@@ -105,7 +105,7 @@ int checkdeps(alpm_list_t *pkglist)
for(i = data; i; i = alpm_list_next(i)) {
pmdepmissing_t *miss = alpm_list_getdata(i);
pmdepend_t *dep = alpm_miss_get_dep(miss);
- char *depstring = alpm_dep_get_string(dep);
+ char *depstring = alpm_dep_compute_string(dep);
printf("missing dependency for %s : %s\n", alpm_miss_get_target(miss),
depstring);
free(depstring);