summaryrefslogtreecommitdiff
path: root/src/lib/syntax.c
diff options
context:
space:
mode:
authorpeter <peter@pmikkelsen.com>2026-08-30 14:25:56 +0000
committerpeter <peter@pmikkelsen.com>2026-08-30 14:25:56 +0000
commit2261ffa04ddf30a7c8eae6e64129b293fc8bffd9 (patch)
tree1c81cb85450ceb66e7e4f56d46ec374ccfaca0e5 /src/lib/syntax.c
parent8521b6a69deab8cdabe1c87b09ecdc93d75af98e (diff)
Let the memory allocation code set the last_error to APLWC_OUT_OF_MEMORY, instead of the callers
FossilOrigin-Name: 46c74e207a84e861636dbfebc4ba8bb9e7b17401dfd2c4fb9bdeae0fa98fd530
Diffstat (limited to 'src/lib/syntax.c')
-rw-r--r--src/lib/syntax.c4
1 files changed, 1 insertions, 3 deletions
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);