]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Mark const for better generated code
authorDale Weiler <killfieldengine@gmail.com>
Sat, 23 Nov 2013 12:44:34 +0000 (07:44 -0500)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 23 Nov 2013 12:44:34 +0000 (07:44 -0500)
util.c

diff --git a/util.c b/util.c
index 4253bd3cd53c18ed66575f02bc2ae6bae7dafd02..ebfafa10bcbbe558c3d2dc6f2fe73fc3d8ff40c1 100644 (file)
--- a/util.c
+++ b/util.c
@@ -460,7 +460,7 @@ uint16_t util_crc16(uint16_t current, const char *k, size_t len) {
     register uint16_t h = current;
 
     /* don't load twice */
-    uint8_t *GMQCC_RESTRICT data = (uint8_t *GMQCC_RESTRICT)k;
+    const uint8_t *GMQCC_RESTRICT data = (const uint8_t *GMQCC_RESTRICT)k;
     size_t n;
 
     /* deal with the first bytes as bytes until we reach an 8 byte boundary */