Skip to content

Commit a439afc

Browse files
committed
opal/util: fix incorrect type casting in opal_path_df
1 parent 22844b0 commit a439afc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

opal/util/path.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* All rights reserved.
1616
* Copyright (c) 2014 Intel, Inc. All rights reserved.
1717
* Copyright (c) 2016 University of Houston. All rights reserved.
18+
* Copyright (c) 2016 Research Organization for Information Science
19+
* and Technology (RIST). All rights reserved.
1820
* $COPYRIGHT$
1921
*
2022
* Additional copyrights may follow
@@ -702,7 +704,7 @@ opal_path_df(const char *path,
702704

703705
/* now set the amount of free space available on path */
704706
/* sometimes buf.f_bavail is negative */
705-
*out_avail = buf.f_bsize * ((int)buf.f_bavail < 0 ? 0 : buf.f_bavail);
707+
*out_avail = buf.f_bsize * ((long)buf.f_bavail < 0 ? 0 : buf.f_bavail);
706708

707709
OPAL_OUTPUT_VERBOSE((10, 2, "opal_path_df: stat(v)fs states "
708710
"path: %s has %"PRIu64 " B of free space.",

0 commit comments

Comments
 (0)