Mesa (master): broadcom/vc5: Fix a typo in memcmp for sig unpack checking.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Dec 14 22:38:01 UTC 2017
Module: Mesa
Branch: master
Commit: 49e2586bfc7f806038bba7864dcff0c50fed1fe9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=49e2586bfc7f806038bba7864dcff0c50fed1fe9
Author: Eric Anholt <eric at anholt.net>
Date: Thu Dec 14 09:41:16 2017 -0800
broadcom/vc5: Fix a typo in memcmp for sig unpack checking.
This shockingly ended up working out, because only the first byte of *sig
is used and (sizeof(*sig) != 0) == 1. Fixes a compiler warning.
Link: https://bugs.freedesktop.org/show_bug.cgi?id=104183
---
src/broadcom/qpu/qpu_pack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/broadcom/qpu/qpu_pack.c b/src/broadcom/qpu/qpu_pack.c
index 0ecce86662..6630ed4b85 100644
--- a/src/broadcom/qpu/qpu_pack.c
+++ b/src/broadcom/qpu/qpu_pack.c
@@ -168,7 +168,7 @@ v3d_qpu_sig_unpack(const struct v3d_device_info *devinfo,
/* Signals with zeroed unpacked contents after element 0 are reserved. */
return (packed_sig == 0 ||
- memcmp(sig, &v33_sig_map[0], sizeof(*sig) != 0));
+ memcmp(sig, &v33_sig_map[0], sizeof(*sig)) != 0);
}
bool
More information about the mesa-commit
mailing list