From: Ian Romanick Date: Tue, 1 Sep 2009 18:24:54 +0000 (-0700) Subject: Use MIN2 instead of open-coded version X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f8fdd81989de5026c8e415f1525931b74dd8647;p=mesa.git Use MIN2 instead of open-coded version Based on review comments by Brian Paul. --- diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index 0471a0ad7f9..cbeda4b384d 100644 --- a/src/mesa/main/syncobj.c +++ b/src/mesa/main/syncobj.c @@ -59,6 +59,7 @@ #include "hash.h" #include "imports.h" #include "context.h" +#include "macros.h" #if FEATURE_ARB_sync #include "syncobj.h" @@ -408,7 +409,7 @@ _mesa_GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, if (size > 0) { - const GLsizei copy_count = (size > bufSize) ? bufSize : size; + const GLsizei copy_count = MIN2(size, bufSize); _mesa_memcpy(values, v, sizeof(GLint) * copy_count); }