From dd09670b3529ec9bf4a83b307a326428b8cbc5ca Mon Sep 17 00:00:00 2001 From: Jerzy Jamroz Date: Wed, 5 Feb 2025 10:29:40 +0100 Subject: [PATCH] refactor: initHookRegister wihout the failure check. --- modules/libcom/src/iocsh/atInit.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/libcom/src/iocsh/atInit.c b/modules/libcom/src/iocsh/atInit.c index 023151026..103a254f8 100644 --- a/modules/libcom/src/iocsh/atInit.c +++ b/modules/libcom/src/iocsh/atInit.c @@ -90,12 +90,7 @@ static void atInitFunc(const iocshArgBuf* args) if (first_time) { first_time = 0; - if (initHookRegister(atInitHook) < 0) { - errno = ENOMEM; - printf(ERL_ERROR " atInit: " - "initHookRegister memory allocation failure %s\n", - strerror(errno)); - } + initHookRegister(atInitHook); } struct cmditem* item = newItem(cmd);