From 2261ffa04ddf30a7c8eae6e64129b293fc8bffd9 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 30 Aug 2026 14:25:56 +0000 Subject: Let the memory allocation code set the last_error to APLWC_OUT_OF_MEMORY, instead of the callers FossilOrigin-Name: 46c74e207a84e861636dbfebc4ba8bb9e7b17401dfd2c4fb9bdeae0fa98fd530 --- src/lib/syntax.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lib/syntax.c') diff --git a/src/lib/syntax.c b/src/lib/syntax.c index 9888bef..16d0363 100644 --- a/src/lib/syntax.c +++ b/src/lib/syntax.c @@ -247,10 +247,8 @@ scan_string(struct aplwc *aplwc, struct string *text, int oneline) } tokens = memory_alloc_token_list(aplwc, n); - if(tokens == NULL){ - aplwc->last_error = APLWC_OUT_OF_MEMORY; + if(tokens == NULL) return NULL; - } tokens->text = text; tokens->length = n; scan(text, tokens); -- cgit v1.2.3