summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 01:01:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 01:01:17 +0000
commitdff42b0ea0e6ef368ebbe0a666ff9be8d708c6df (patch)
tree747bdfdc049be6d4290cf28a1a7675fe7a8efcfa /ext/strscan/strscan.c
parente76567c15b5b8bf5d45514d0c70cb40f6b15731f (diff)
* ext/**/*.c (*_memsize): same as r52986 for extensions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/strscan/strscan.c')
-rw-r--r--ext/strscan/strscan.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index a0a015b..f7592c9 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -181,11 +181,7 @@ static size_t
strscan_memsize(const void *ptr)
{
const struct strscanner *p = ptr;
- size_t size = 0;
- if (p) {
- size = sizeof(*p) - sizeof(p->regs) + onig_region_memsize(&p->regs);
- }
- return size;
+ return sizeof(*p) - sizeof(p->regs) + onig_region_memsize(&p->regs);
}
static const rb_data_type_t strscanner_type = {