diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 51c25ed..f382d3c 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -80,7 +80,7 @@ static alpm_list_t *mount_point_list() endmntent(fp); #elif defined HAVE_GETMNTINFO int entries; - struct statvfs *fsp; + struct statfs *fsp; entries = getmntinfo(&fsp, MNT_NOWAIT); @@ -89,12 +89,12 @@ static alpm_list_t *mount_point_list() } for(; entries-- > 0; fsp++) { - if((&fsp)->f_bfree != 0) { + if(fsp->f_bfree != 0) { MALLOC(mp, sizeof(alpm_mountpoint_t), RET_ERR(PM_ERR_MEMORY, NULL)); - mp->mount_dir = strdup(fsp->f_mntonname) + mp->mount_dir = strdup(fsp->f_mntonname); - MALLOC(mp->fsp, sizeof(struct statvfs), RET_ERR(PM_ERR_MEMORY, NULL)); - memcpy((void *)(mp->fsp), (void *)fsp, sizeof(struct statvfs)); + MALLOC(mp->fsp, sizeof(struct statfs), RET_ERR(PM_ERR_MEMORY, NULL)); + memcpy((void *)(mp->fsp), (void *)fsp, sizeof(struct statfs)); mp->blocks_needed = 0; mp->max_blocks_needed = 0;