1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-08-09 13:41:26 +00:00
parent ca3b9bbfe0
commit 23f039f3b3

4
re.c
View file

@ -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;