diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-02-18 18:44:38 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-02-18 19:30:51 -0800 |
commit | 4347b8987732b5bea83ddb8fb9605cf2c4a1c2fe (patch) | |
tree | 1b173bd6184ef285122cfafb872260183f1eed27 /ext/unicorn_http/ext_help.h | |
parent | 3e80ccb60e2b3632916094ac436806ab1cf03b11 (diff) | |
download | unicorn-4347b8987732b5bea83ddb8fb9605cf2c4a1c2fe.tar.gz |
We never come close to the signed limits anywhere, so it should be safe either way, but make paranoid compiler settings less noisy if possible.
Diffstat (limited to 'ext/unicorn_http/ext_help.h')
-rw-r--r-- | ext/unicorn_http/ext_help.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/unicorn_http/ext_help.h b/ext/unicorn_http/ext_help.h index 7df73f7..888bd36 100644 --- a/ext/unicorn_http/ext_help.h +++ b/ext/unicorn_http/ext_help.h @@ -47,7 +47,7 @@ static void rb_18_str_set_len(VALUE str, long len) # define rb_str_modify(x) do {} while (0) #endif /* ! defined(HAVE_RB_STR_MODIFY) */ -static inline int str_cstr_eq(VALUE val, const char *ptr, size_t len) +static inline int str_cstr_eq(VALUE val, const char *ptr, long len) { return (RSTRING_LEN(val) == len && !memcmp(ptr, RSTRING_PTR(val), len)); } @@ -56,7 +56,7 @@ static inline int str_cstr_eq(VALUE val, const char *ptr, size_t len) str_cstr_eq(val, const_str, sizeof(const_str) - 1) /* strcasecmp isn't locale independent */ -static int str_cstr_case_eq(VALUE val, const char *ptr, size_t len) +static int str_cstr_case_eq(VALUE val, const char *ptr, long len) { if (RSTRING_LEN(val) == len) { const char *v = RSTRING_PTR(val); |