summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2020-07-01 12:26:02 +0100
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2020-07-02 13:58:06 +0100
commit1ae509d19e28c9fcbc48580e8aff33bae0e4ec6e (patch)
tree1b586e65454a3929b6900d3daa7e123f4ea633e0 /util.c
parenta1e82abeae8300aeb5da0e76975d0dd9202b7f8f (diff)
downloadperl-1ae509d19e28c9fcbc48580e8aff33bae0e4ec6e.tar.gz
Remove redundant ternary in safesysmalloc
Commit b001a0d149ed99df18916796f3a72b2c888b94d8 changed it to bumping the size from 0 to 1 earlier in the function, but didn't remove the then-redundant ternary that tried to avoid passing zero to PerlMem_malloc().
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index c64e88ddc1..9aa8f5531f 100644
--- a/util.c
+++ b/util.c
@@ -152,7 +152,7 @@ Perl_safesysmalloc(MEM_SIZE size)
abort();
}
#else
- ptr = (Malloc_t)PerlMem_malloc(size?size:1);
+ ptr = (Malloc_t)PerlMem_malloc(size);
#endif
PERL_ALLOC_CHECK(ptr);
if (ptr != NULL) {