From f96a3b398923205d9ad14d53f21d60ee7e6410b2 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Tue, 14 Aug 2018 02:36:28 +0500 Subject: [PATCH] src/Cedar/EtherLog: remove null dereference introduced in #650 also, remove unused functions: [src/Cedar/EtherLog.c:1377]: (style) The function 'ElFree' is never used. [src/Cedar/EtherLog.c:1370]: (style) The function 'ElInit' is never used. --- src/Cedar/EtherLog.c | 17 +---------------- src/Cedar/EtherLog.h | 2 -- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/Cedar/EtherLog.c b/src/Cedar/EtherLog.c index 26ddf654..dc593d21 100644 --- a/src/Cedar/EtherLog.c +++ b/src/Cedar/EtherLog.c @@ -281,7 +281,7 @@ PACK *ElRpcServer(RPC *r, char *name, PACK *p) UINT err; bool ok; // Validate arguments - if (r == NULL || name == NULL || p == NULL || e == NULL) + if (r == NULL || name == NULL || p == NULL || r->Param == NULL) { return NULL; } @@ -1366,18 +1366,3 @@ void ElStop() Unlock(el_lock); } -// EL initialization -void ElInit() -{ - // Lock initialization - el_lock = NewLock(); -} - -// EL release -void ElFree() -{ - // Lock release - DeleteLock(el_lock); - el_lock = NULL; -} - diff --git a/src/Cedar/EtherLog.h b/src/Cedar/EtherLog.h index 593ecd55..f05647be 100644 --- a/src/Cedar/EtherLog.h +++ b/src/Cedar/EtherLog.h @@ -205,8 +205,6 @@ struct EL }; // Function prototype -void ElInit(); -void ElFree(); void ElStart(); void ElStop(); EL *NewEl();