Skip to contentSkip to conversation

LVM2/lib/report report.c

PATCH [email protected] 1 participant 1 message Feb 15, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-02-15 18:35:06

Modified files:
lib/report : report.c

Log message:
Cleanup float arithmetic gcc warning.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/report.c.diff?cvsroot=lvm2&r1=1.113&r2=1.114

lib/report/report.c +2 -2
@@ -1049,7 +1049,7 @@
 		return 0;
 	}
 
-	*sortval = snap_percent * UINT64_C(1000);
+	*sortval = (uint64_t)(snap_percent * 1000.f);
 	dm_report_field_set_value(field, repstr, sortval);
 
 	return 1;
@@ -1091,7 +1091,7 @@
 		return 0;
 	}
 
-	*sortval = percent * UINT64_C(1000);
+	*sortval = (uint64_t)(percent * 1000.f);
 	dm_report_field_set_value(field, repstr, sortval);
 
 	return 1;