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/module.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/lib/module.c') diff --git a/src/lib/module.c b/src/lib/module.c index 4c96f64..db5dc78 100644 --- a/src/lib/module.c +++ b/src/lib/module.c @@ -59,10 +59,8 @@ load_module(struct aplwc *aplwc, struct string *name, struct token_list *tokens) struct aplwc_module *module; module = memory_alloc_aplwc_module(aplwc); - if(module == NULL){ - aplwc->last_error = APLWC_OUT_OF_MEMORY; + if(module == NULL) return aplwc->last_error; - } module->aplwc = aplwc; module->name = name; module->tokens = tokens; -- cgit v1.2.3