summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-08-13 11:16:36 (GMT)
committerFabiano FidĂȘncio <fidencio@redhat.com>2015-08-17 15:53:57 (GMT)
commit5001f2b1b155f4279a3e942b9bbf97f9d489a90a (patch)
tree70a4f4d30e85bb4ce727a7d8ad1c58533ee9aa66
parent1782fdd0503453ea39812cb5f79e6de0248c4afc (diff)
downloadvirt-viewer-master.zip
virt-viewer-master.tar.gz
virt-viewer-master.tar.xz
coverity: result is not floating-pointHEADmaster
Coverity says: Result is not floating-point (UNINTENDED_INTEGER_DIVISION) interger_division: Dividing integer expressions "preferred->width * 100" and "zoom", and then converting the integer quotient to type double. Any remainder, or fractional part of the quotient, is ignored.
-rw-r--r--src/virt-viewer-display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c
index 3efe24c..8431ae4 100644
--- a/src/virt-viewer-display.c
+++ b/src/virt-viewer-display.c
@@ -819,8 +819,8 @@ void virt_viewer_display_get_preferred_monitor_geometry(VirtViewerDisplay* self,
if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) {
guint zoom = virt_viewer_display_get_zoom_level(VIRT_VIEWER_DISPLAY(self));
- preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / zoom);
- preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / zoom);
+ preferred->width = round(preferred->width * NORMAL_ZOOM_LEVEL / (double) zoom);
+ preferred->height = round(preferred->height * NORMAL_ZOOM_LEVEL / (double) zoom);
}
}