From c48937aba802ade5c256aac15fc4cc6f70eeba56 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 10 Jan 2016 12:36:12 -0800 Subject: Remove redundant assert in mem allocation functions. * lib.c (chk_strdup, chk_strdup_utf8, chk_copy_obj): No need to assert !async_sig_enabled since the lower level chk_malloc or chk_malloc does it. --- lib.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index 79991ae2..245c0d3a 100644 --- a/lib.c +++ b/lib.c @@ -2344,7 +2344,6 @@ wchar_t *chk_strdup(const wchar_t *str) { size_t nchar = wcslen(str) + 1; wchar_t *copy = chk_wmalloc(nchar); - assert (!async_sig_enabled); wmemcpy(copy, str, nchar); return copy; } @@ -2353,7 +2352,6 @@ char *chk_strdup_utf8(const char *str) { size_t nchar = strlen(str) + 1; char *copy = coerce(char *, chk_malloc(nchar)); - assert (!async_sig_enabled); memcpy(copy, str, nchar); return copy; } @@ -2361,7 +2359,6 @@ char *chk_strdup_utf8(const char *str) mem_t *chk_copy_obj(mem_t *orig, size_t size) { mem_t *copy = chk_malloc(size); - assert (!async_sig_enabled); memcpy(copy, orig, size); return copy; } -- cgit v1.2.3