libCom/ellLib: make sort comparator args const pointers

This commit is contained in:
Ralph Lange
2016-10-07 10:52:13 +02:00
parent de6a442048
commit 3fa8f2ac22
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);