summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/syncobj.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-09-01 11:24:54 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-09-03 11:22:47 -0700
commit0f8fdd81989de5026c8e415f1525931b74dd8647 (patch)
treecff6b89e40773c6d34e3ba008c488a1701f027ea /src/mesa/main/syncobj.c
parent16b393d05990b6e917e144f9de87d0103b4c3e6d (diff)
downloadexternal_mesa3d-0f8fdd81989de5026c8e415f1525931b74dd8647.zip
external_mesa3d-0f8fdd81989de5026c8e415f1525931b74dd8647.tar.gz
external_mesa3d-0f8fdd81989de5026c8e415f1525931b74dd8647.tar.bz2
Use MIN2 instead of open-coded version
Based on review comments by Brian Paul.
Diffstat (limited to 'src/mesa/main/syncobj.c')
-rw-r--r--src/mesa/main/syncobj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 0471a0a..cbeda4b 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);
}