From: Ran Benita Date: Fri, 2 Mar 2012 14:12:18 +0000 (+0200) Subject: Use limits.h to find min/max short value X-Git-Tag: accepted/2.0alpha-wayland/20121109.204519~274^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0b442356ceb57f6d3b8e8c3328f30d68e9fdbea;p=profile%2Fivi%2Flibxkbcommon.git Use limits.h to find min/max short value Signed-off-by: Ran Benita --- diff --git a/src/geom.c b/src/geom.c index e839be9..6985a5f 100644 --- a/src/geom.c +++ b/src/geom.c @@ -28,17 +28,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #endif +#include #include "xkbgeom.h" #include "xkbcommon/xkbcommon.h" #include "XKBcommonint.h" -#ifndef MINSHORT -#define MINSHORT -32768 -#endif -#ifndef MAXSHORT -#define MAXSHORT 32767 -#endif - static void _XkbCheckBounds(struct xkb_bounds * bounds, int x, int y) { @@ -62,8 +56,8 @@ XkbcComputeShapeBounds(struct xkb_shape * shape) if ((!shape) || (shape->num_outlines < 1)) return False; - shape->bounds.x1 = shape->bounds.y1 = MAXSHORT; - shape->bounds.x2 = shape->bounds.y2 = MINSHORT; + shape->bounds.x1 = shape->bounds.y1 = SHRT_MAX; + shape->bounds.x2 = shape->bounds.y2 = SHRT_MIN; for (outline = shape->outlines, o = 0; o < shape->num_outlines; o++, outline++)