From 5d291d050ebd714851c6bd85efd49a03d88414f0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 18 Aug 2011 00:28:53 -0500 Subject: Remove usages of alpm_list_next() in backend Another function call that can be replaced by a single pointer dereference. Signed-off-by: Dan McGee --- lib/libalpm/diskspace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libalpm/diskspace.c') diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 4e7ffaad..1e2fa143 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -282,7 +282,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle) } calculate_installed_size(handle, mount_points, pkg); - for(i = mount_points; i; i = alpm_list_next(i)) { + for(i = mount_points; i; i = i->next) { alpm_mountpoint_t *data = i->data; if(data->blocks_needed > data->max_blocks_needed) { data->max_blocks_needed = data->blocks_needed; @@ -293,7 +293,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle) PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", 100, numtargs, current); - for(i = mount_points; i; i = alpm_list_next(i)) { + for(i = mount_points; i; i = i->next) { alpm_mountpoint_t *data = i->data; if(data->used && data->read_only) { _alpm_log(handle, ALPM_LOG_ERROR, _("Partition %s is mounted read only\n"), @@ -318,7 +318,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle) } } - for(i = mount_points; i; i = alpm_list_next(i)) { + for(i = mount_points; i; i = i->next) { alpm_mountpoint_t *data = i->data; FREE(data->mount_dir); } -- cgit v1.2.3-54-g00ecf