PERFORCE change 219779 for review

Bjoern A. Zeeb bz at FreeBSD.org
Wed Nov 14 05:40:04 UTC 2012


http://p4web.freebsd.org/@@219779?ac=10

Change 219779 by bz at bz_zenith on 2012/11/14 05:39:14

	Remove (double) casts from
		(png_int_32) < (double)((png_uint_32)0x7fffffffL)
	       which actually is
		long < (double)unsigned long
	to remove the need for __floatdidf and __gtdf2.

Affected files ...

.. //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libvuln_png/pngset.c#2 edit

Differences ...

==== //depot/projects/ctsrd/cheribsd/src/ctsrd-lib/libvuln_png/pngset.c#2 (text+ko) ====

@@ -100,10 +100,10 @@
         "Ignoring attempt to set negative chromaticity value");
       return;
    }
-   if (white_x > (double) PNG_MAX_UINT || white_y > (double) PNG_MAX_UINT ||
-         red_x > (double) PNG_MAX_UINT ||   red_y > (double) PNG_MAX_UINT ||
-       green_x > (double) PNG_MAX_UINT || green_y > (double) PNG_MAX_UINT ||
-        blue_x > (double) PNG_MAX_UINT ||  blue_y > (double) PNG_MAX_UINT)
+   if (white_x > PNG_MAX_UINT || white_y > PNG_MAX_UINT ||
+         red_x > PNG_MAX_UINT ||   red_y > PNG_MAX_UINT ||
+       green_x > PNG_MAX_UINT || green_y > PNG_MAX_UINT ||
+        blue_x > PNG_MAX_UINT ||  blue_y > PNG_MAX_UINT)
    {
       png_warning(png_ptr,
         "Ignoring attempt to set chromaticity value exceeding 21474.83");


More information about the p4-projects mailing list