From 3fa8f2ac22a244c3559788e32b8a1527cfed06bc Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 7 Oct 2016 10:52:13 +0200 Subject: [PATCH] libCom/ellLib: make sort comparator args const pointers --- src/libCom/ellLib/ellLib.h | 2 +- src/libCom/test/epicsEllTest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libCom/ellLib/ellLib.h b/src/libCom/ellLib/ellLib.h index 300a2df3f..52b58d169 100644 --- a/src/libCom/ellLib/ellLib.h +++ b/src/libCom/ellLib/ellLib.h @@ -56,7 +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); -typedef int (*pListCmp)(ELLNODE* A, ELLNODE* B); +typedef int (*pListCmp)(const ELLNODE* A, const ELLNODE* B); epicsShareFunc void ellSortStable(ELLLIST *pList, pListCmp); epicsShareFunc void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc); epicsShareFunc void ellVerify (ELLLIST *pList); diff --git a/src/libCom/test/epicsEllTest.c b/src/libCom/test/epicsEllTest.c index 78c695466..62ee14e39 100644 --- a/src/libCom/test/epicsEllTest.c +++ b/src/libCom/test/epicsEllTest.c @@ -196,7 +196,7 @@ static void testList(void) typedef struct { int A, B; } input_t; -static int myItemCmp(ELLNODE *a, ELLNODE *b) +static int myItemCmp(const ELLNODE *a, const ELLNODE *b) { struct myItem *A = CONTAINER(a, struct myItem, node), *B = CONTAINER(b, struct myItem, node);