projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16b393d
)
Use MIN2 instead of open-coded version
author
Ian Romanick
<ian.d.romanick@intel.com>
Tue, 1 Sep 2009 18:24:54 +0000
(11:24 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Thu, 3 Sep 2009 18:22:47 +0000
(11:22 -0700)
Based on review comments by Brian Paul.
src/mesa/main/syncobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/syncobj.c
b/src/mesa/main/syncobj.c
index 0471a0ad7f92dc4b34c11659174e778b5c0ae6d5..cbeda4b384d6f4ea7defa45ed89cbc17069c0832 100644
(file)
--- 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);
}