summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-09 13:41:26 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-09 13:41:26 (GMT)
commit23f039f3b39f4eab3e23477b8e4f48d40671b9a2 (patch)
treecb66d28528d0dca1e56ecf944ee48c9c79e77418 /re.c
parentca3b9bbfe02cef6105ac69b1be2e2a532068be17 (diff)
re.c: suppress warning
* re.c (rb_memsearch): suppress parentheses warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/re.c b/re.c
index dd40918..9954805 100644
--- a/re.c
+++ b/re.c
@@ -236,9 +236,9 @@ rb_memsearch(const void *x0, long m, const void *y0, long n, rb_encoding *enc)
return 0;
}
else if (m == 1) {
- const unsigned char *ys;
+ const unsigned char *ys = memchr(y, *x, n);
- if (ys = memchr(y, *x, n))
+ if (ys)
return ys - y;
else
return -1;