From 277c3193891f34590d09339aa4b8c6cf81df3836 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Fri, 26 Aug 2016 09:42:45 +0900 Subject: [PATCH] opal/util: fix (again and again) incorrect type casting in opal_path_df and silence CID 1371767 this fixes previous commits : - open-mpi/ompi@2eec8970ff63d61692182e0cad81a9bb820e11b6 - open-mpi/ompi@a439afce5ba1bfb65f049bb2ba1113b2762feb46 --- opal/util/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opal/util/path.c b/opal/util/path.c index 2b4bfa22ea..7c69c017ce 100644 --- a/opal/util/path.c +++ b/opal/util/path.c @@ -704,7 +704,7 @@ opal_path_df(const char *path, /* now set the amount of free space available on path */ /* sometimes buf.f_bavail is negative */ - *out_avail = (uint64_t)buf.f_bsize * (uint64_t)(buf.f_bavail < 0 ? 0 : buf.f_bavail); + *out_avail = (uint64_t)buf.f_bsize * (uint64_t)((long)buf.f_bavail < 0 ? 0 : buf.f_bavail); OPAL_OUTPUT_VERBOSE((10, 2, "opal_path_df: stat(v)fs states " "path: %s has %"PRIu64 " B of free space.",