diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-10 12:36:12 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-10 12:36:12 -0800 |
commit | c48937aba802ade5c256aac15fc4cc6f70eeba56 (patch) | |
tree | 066fcb136e138fac28d3f4911329fe7c2da817e9 | |
parent | bf8f5100eaf348023cfa04f540bba2fa3cf738a4 (diff) | |
download | txr-c48937aba802ade5c256aac15fc4cc6f70eeba56.tar.gz txr-c48937aba802ade5c256aac15fc4cc6f70eeba56.tar.bz2 txr-c48937aba802ade5c256aac15fc4cc6f70eeba56.zip |
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.
-rw-r--r-- | lib.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -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; } |