summaryrefslogtreecommitdiff
path: root/src/unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unicode.c')
-rw-r--r--src/unicode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/unicode.c b/src/unicode.c
index b715a47..a2dcacb 100644
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -19,8 +19,7 @@ char* unicode_transcode16to8(const ntfs_char* src, size_t len)
/* Allocate 1.25 times the length initially */
alloc = len + (len / 4) + 1;
- ret = (char*)malloc(alloc * sizeof(char));
- if(!ret) return NULL;
+ ret = (char*)mallocf(alloc * sizeof(char));
c = src;
e = c + len;
@@ -31,8 +30,7 @@ char* unicode_transcode16to8(const ntfs_char* src, size_t len)
if(pos + 4 >= alloc)
{
alloc += (len / 2) + 1;
- if(!(ret = (char*)reallocf(ret, alloc * sizeof(char))))
- return NULL;
+ ret = (char*)reallocf(ret, alloc * sizeof(char));
}
/* Encode as one character */