[Mesa-dev] [PATCH] glsl: Remove tautological check
Eric Engestrom
eric at engestrom.ch
Tue May 31 01:19:11 UTC 2016
`size_t offset` can never be `< 0`
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
src/compiler/glsl/blob.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/blob.c b/src/compiler/glsl/blob.c
index dd4341b..ef17255 100644
--- a/src/compiler/glsl/blob.c
+++ b/src/compiler/glsl/blob.c
@@ -107,7 +107,7 @@ blob_overwrite_bytes(struct blob *blob,
size_t to_write)
{
/* Detect an attempt to overwrite data out of bounds. */
- if (offset < 0 || blob->size - offset < to_write)
+ if (blob->size - offset < to_write)
return false;
memcpy(blob->data + offset, bytes, to_write);
--
2.8.3
More information about the mesa-dev
mailing list