summaryrefslogtreecommitdiff
path: root/lib/libalpm/diskspace.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-08-01 14:19:54 -0700
committerAllan McRae <allan@archlinux.org>2014-08-04 14:23:58 +1000
commit2025279eb64c397e408baab7ff686624604f415a (patch)
tree86534a508550250a4e583220b844e09d46a86bb5 /lib/libalpm/diskspace.c
parentd981f93f18449e2cb7b67bfb417aac4737c84b57 (diff)
downloadpacman-2025279eb64c397e408baab7ff686624604f415a.tar.xz
replace strdup with STRDUP
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/diskspace.c')
-rw-r--r--lib/libalpm/diskspace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index 606f2dcc..af87f755 100644
--- a/lib/libalpm/diskspace.c
+++ b/lib/libalpm/diskspace.c
@@ -112,7 +112,7 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
while((mnt = getmntent(fp))) {
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
- mp->mount_dir = strdup(mnt->mnt_dir);
+ STRDUP(mp->mount_dir, mnt->mnt_dir, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
mp->mount_dir_len = strlen(mp->mount_dir);
mount_points = alpm_list_add(mount_points, mp);
@@ -135,7 +135,7 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
while((ret = getmntent(fp, &mnt)) == 0) {
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
- mp->mount_dir = strdup(mnt->mnt_mountp);
+ STRDUP(mp->mount_dir, mnt->mnt_mountp, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
mp->mount_dir_len = strlen(mp->mount_dir);
mount_points = alpm_list_add(mount_points, mp);
@@ -162,7 +162,7 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
for(; entries-- > 0; fsp++) {
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
- mp->mount_dir = strdup(fsp->f_mntonname);
+ STRDUP(mp->mount_dir, fsp->f_mntonname, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
mp->mount_dir_len = strlen(mp->mount_dir);
memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE));
#if defined(HAVE_GETMNTINFO_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FLAG)