Mercurial > hg > th-libs
diff th_regex.c @ 711:c91902120e79
Cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 27 Apr 2020 01:28:14 +0300 |
parents | dee28d507da7 |
children | 838189b856f3 |
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;