changeset 711:c91902120e79

Cleanup.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 27 Apr 2020 01:28:14 +0300
parents c1c37f6ca133
children 838189b856f3
files th_regex.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/th_regex.c	Mon Apr 27 01:21:50 2020 +0300
+++ b/th_regex.c	Mon Apr 27 01:28:14 2020 +0300
@@ -198,11 +198,9 @@
 {
     th_regex_t *data;
 
-    if (ctx->data == NULL)
-    {
-        if ((data = ctx->data = th_malloc0(sizeof(th_regex_t))) == NULL)
-            return THERR_MALLOC;
-    }
+    if (ctx->data == NULL &&
+        (data = ctx->data = th_malloc0(sizeof(th_regex_t))) == NULL)
+        return THERR_MALLOC;
     else
         data = ctx->data;