summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-01-10 12:36:12 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-01-10 12:36:12 -0800
commitc48937aba802ade5c256aac15fc4cc6f70eeba56 (patch)
tree066fcb136e138fac28d3f4911329fe7c2da817e9
parentbf8f5100eaf348023cfa04f540bba2fa3cf738a4 (diff)
downloadtxr-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.c3
1 files changed, 0 insertions, 3 deletions
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;
}