summaryrefslogtreecommitdiff
path: root/platform/gl/gl-main.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-08-24 14:19:20 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-10-06 11:21:23 +0200
commitd1d9d13d1114fea2578004c338d8f6a9932159b2 (patch)
tree4ef07ea08536fd99752237b6ed36138b2b3276e2 /platform/gl/gl-main.c
parent8f537120830960886d4d45c31666bb4896b2bb55 (diff)
downloadmupdf-d1d9d13d1114fea2578004c338d8f6a9932159b2.tar.xz
gl: Remove unneeded fz_malloc return value test.
Diffstat (limited to 'platform/gl/gl-main.c')
-rw-r--r--platform/gl/gl-main.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
index 95ec02e6..67549efe 100644
--- a/platform/gl/gl-main.c
+++ b/platform/gl/gl-main.c
@@ -1211,22 +1211,18 @@ static char *
utf8_from_rune_string(fz_context *ctx, const int *s, const int *e)
{
const int *src = s;
- char *d;
- char *dst;
+ char *d, *dst;
int len = 1;
while (src < e)
len += fz_runelen(*src++);
- d = fz_malloc(ctx, len);
- if (d != NULL)
- {
- dst = d;
- src = s;
- while (src < e)
- dst += fz_runetochar(dst, *src++);
- *dst = 0;
- }
+ dst = d = fz_malloc(ctx, len);
+ src = s;
+ while (src < e)
+ dst += fz_runetochar(dst, *src++);
+ *dst = 0;
+
return d;
}