summaryrefslogtreecommitdiff
path: root/ext/fiddle/closure.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fiddle/closure.c')
-rw-r--r--ext/fiddle/closure.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/fiddle/closure.c b/ext/fiddle/closure.c
index 2263b41..f19091b 100644
--- a/ext/fiddle/closure.c
+++ b/ext/fiddle/closure.c
@@ -41,14 +41,13 @@ closure_memsize(const void * ptr)
fiddle_closure * cls = (fiddle_closure *)ptr;
size_t size = 0;
- if (ptr) {
- size += sizeof(*cls);
+ size += sizeof(*cls);
#if !defined(FFI_NO_RAW_API) || !FFI_NO_RAW_API
- size += ffi_raw_size(&cls->cif);
+ size += ffi_raw_size(&cls->cif);
#endif
- size += sizeof(*cls->argv);
- size += sizeof(ffi_closure);
- }
+ size += sizeof(*cls->argv);
+ size += sizeof(ffi_closure);
+
return size;
}