about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <kcar-public@bogomips.org>2017-03-05 23:18:19 +0000
committerEric Wong <kcar-public@bogomips.org>2017-03-05 23:19:15 +0000
commit5f5c04da8e25ee08004e31576792605feae9f059 (patch)
tree4193333568133fb4fd7b84041b96df2bf70514e0
parent519afc9dc9b6f3dc402049fc7a6b2bb4ef19b795 (diff)
downloadkcar-5f5c04da8e25ee08004e31576792605feae9f059.tar.gz
This fixes a -Wsign-compare warning on my 32-bit system:
 warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
-rw-r--r--ext/kcar/kcar.rl2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/kcar/kcar.rl b/ext/kcar/kcar.rl
index 2155ab4..d21b243 100644
--- a/ext/kcar/kcar.rl
+++ b/ext/kcar/kcar.rl
@@ -560,7 +560,7 @@ static VALUE chunked(VALUE self)
 
 static void check_buffer_size(long dlen)
 {
-  if (dlen > UINT_MAX)
+  if ((uint64_t)dlen > UINT_MAX)
     rb_raise(rb_eRangeError, "headers too large to process (%ld bytes)", dlen);
 }