diff --git a/src/db/dbBkpt.c b/src/db/dbBkpt.c index 6160415b2..1035df8e7 100644 --- a/src/db/dbBkpt.c +++ b/src/db/dbBkpt.c @@ -613,7 +613,7 @@ static void dbBkptCont(dbCommon *precord) --lset_stack_count; /* free entrypoint queue */ - ellFree(&pnode->ep_queue, free); + ellFree(&pnode->ep_queue); /* remove execution semaphore */ epicsEventDestroy(pnode->ex_sem); diff --git a/src/libCom/ellLib/ellLib.c b/src/libCom/ellLib/ellLib.c index 8444331c0..6be432319 100644 --- a/src/libCom/ellLib/ellLib.c +++ b/src/libCom/ellLib/ellLib.c @@ -263,11 +263,10 @@ int ellFind (ELLLIST *pList, ELLNODE *pNode) * * NOTE: the nodes in the list are free()'d on the assumption that the node * structures were malloc()'d one-at-a-time and that the ELLNODE structure is - * the first thing in the "rest of" the node structure. - * In other words, this is a pretty worthless function. + * the first member of the parent structure. * *****************************************************************************/ -void ellFree (ELLLIST *pList, FREEFUNC freeFunc) +void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc) { ELLNODE *nnode = pList->node.next; ELLNODE *pnode; diff --git a/src/libCom/ellLib/ellLib.h b/src/libCom/ellLib/ellLib.h index 9af5487c2..a7ba68d2d 100644 --- a/src/libCom/ellLib/ellLib.h +++ b/src/libCom/ellLib/ellLib.h @@ -45,6 +45,7 @@ typedef void (*FREEFUNC)(void *); #define ellLast(PLIST) ((PLIST)->node.previous) #define ellNext(PNODE) ((PNODE)->next) #define ellPrevious(PNODE) ((PNODE)->previous) +#define ellFree(PLIST) ellFree2(PLIST, free) epicsShareFunc void ellAdd (ELLLIST *pList, ELLNODE *pNode); epicsShareFunc void ellConcat (ELLLIST *pDstList, ELLLIST *pAddList); @@ -55,8 +56,7 @@ epicsShareFunc void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode); epicsShareFunc ELLNODE * ellNth (ELLLIST *pList, int nodeNum); epicsShareFunc ELLNODE * ellNStep (ELLNODE *pNode, int nStep); epicsShareFunc int ellFind (ELLLIST *pList, ELLNODE *pNode); -/* ellFree has to take a free function to work properly on Windows */ -epicsShareFunc void ellFree (ELLLIST *pList, FREEFUNC freeFunc); +epicsShareFunc void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc); epicsShareFunc void ellVerify (ELLLIST *pList); #ifdef __cplusplus diff --git a/src/libCom/misc/epicsExit.c b/src/libCom/misc/epicsExit.c index 3d46ff281..5992d4ae8 100644 --- a/src/libCom/misc/epicsExit.c +++ b/src/libCom/misc/epicsExit.c @@ -3,8 +3,7 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found +* EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ /*epicsExit.c*/ @@ -52,7 +51,7 @@ static epicsThreadPrivateId exitPvtPerThread = 0; static void destroyExitPvt ( exitPvt * pep ) { - ellFree ( &pep->list, free ); + ellFree ( &pep->list ); free ( pep ); } diff --git a/src/libCom/test/epicsEllTest.c b/src/libCom/test/epicsEllTest.c index 77634c4e6..b608d1cc3 100644 --- a/src/libCom/test/epicsEllTest.c +++ b/src/libCom/test/epicsEllTest.c @@ -161,7 +161,7 @@ MAIN(epicsEllTest) testOk1(ellFind(&list2, ellNth(&list2, 10)) == 10); testOk1(ellFind(&list1, ellNth(&list1, 11)) == 11); - ellFree(&list2, free); + ellFree(&list2); testOk1(ellCount(&list2) == 0); pick = (struct myItem *)ellFirst(&list1); @@ -190,7 +190,7 @@ MAIN(epicsEllTest) pitem = (struct myItem *)ellNStep(&pitem->node, -4); testOk1(pitem->num == 7); - ellFree(&list1, free); + ellFree2(&list1, free); testOk1(ellCount(&list1) == 0); return testDone();