diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2009-09-01 11:24:54 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2009-09-01 11:25:11 -0700 |
commit | 4f02119988aa6a2119c351076ce05e2c96f8fc4d (patch) | |
tree | e910f235f58b5bc3227fa9d142e45afd4a8a54cf | |
parent | 9f81614d52f1ed4a3d83ab566c445d2767862770 (diff) |
Use MIN2 instead of open-coded version
Based on review comments by Brian Paul.
-rw-r--r-- | src/mesa/main/syncobj.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index 0471a0ad7f..cbeda4b384 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); } |