diff --git a/mx_util.c b/mx_util.c index abd53a4..04e5a6d 100644 --- a/mx_util.c +++ b/mx_util.c @@ -556,11 +556,13 @@ int mx_strtoi64(char *str, int64_t *to) void *mx_malloc_forever(size_t size) { void *ret; + do { - ret=malloc(size); + ret = malloc(size); assert(ret || (!ret && errno == ENOMEM)); - } while (!ret); - return ret ; + } while (!ret); + + return ret ; } char *mx_strdup_forever(char *str)