summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 21:34:01 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 21:34:01 (GMT)
commit328205c56ec6e622a03d16fac1e5d00ff84c221a (patch)
tree94661d2a89a648a2cc4190953d76400de46df581 /marshal.c
parent19f035ccee65846678357f3b2e145191dabb6424 (diff)
marshal.c: remove NULL checks for *_memsize
This follows r52986, NULL checks in rb_data_type_t.function.dsize callbacks are unnecessary. * marshal.c (memsize_dump_arg): remove NULL check (memsize_load_arg): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/marshal.c b/marshal.c
index 8bc8019..d67ce87 100644
--- a/marshal.c
+++ b/marshal.c
@@ -207,7 +207,7 @@ free_dump_arg(void *ptr)
static size_t
memsize_dump_arg(const void *ptr)
{
- return ptr ? sizeof(struct dump_arg) : 0;
+ return sizeof(struct dump_arg);
}
static const rb_data_type_t dump_arg_data = {
@@ -1091,7 +1091,7 @@ free_load_arg(void *ptr)
static size_t
memsize_load_arg(const void *ptr)
{
- return ptr ? sizeof(struct load_arg) : 0;
+ return sizeof(struct load_arg);
}
static const rb_data_type_t load_arg_data = {