From f3e24ea8e3ee44eaceb84d5dc4643ed5f8554ab6 Mon Sep 17 00:00:00 2001 From: Jerzy Jamroz Date: Wed, 5 Feb 2025 10:44:43 +0100 Subject: [PATCH] fix: mallocMustSucceed makes this check unnecessary. --- modules/libcom/src/iocsh/atInit.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/libcom/src/iocsh/atInit.c b/modules/libcom/src/iocsh/atInit.c index 103a254f8..e5d3cd823 100644 --- a/modules/libcom/src/iocsh/atInit.c +++ b/modules/libcom/src/iocsh/atInit.c @@ -9,14 +9,12 @@ #include #include #include -#include #include #include #include #include "atInit.h" -// Version within the message static const char helpMessage[] = "Allows you to define commands to be run after the iocInit\n" "Example commands:\n" @@ -93,12 +91,7 @@ static void atInitFunc(const iocshArgBuf* args) initHookRegister(atInitHook); } - struct cmditem* item = newItem(cmd); - - if (!item) - printf(ERL_ERROR " atInit: " - "failed to add the command '%s' %s\n", - cmd, strerror(errno)); + newItem(cmd); } void atInitRegister(void)