# HG changeset patch # User Matti Hamalainen # Date 1587940094 -10800 # Node ID c91902120e795f15b030d9873a2694e5bc440aa2 # Parent c1c37f6ca133ac3a5a94e4a28e91375ac4872c13 Cleanup. diff -r c1c37f6ca133 -r c91902120e79 th_regex.c --- 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;