Skip to content
Snippets Groups Projects
Commit 5fc2a9c6 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Isolate resource list lookup from value extraction.

parent 333749a4
No related branches found
No related tags found
No related merge requests found
......@@ -264,12 +264,12 @@ void reshRemove ( cdiResH resH, resOps * ops )
/**************************************************************/
void *reshGetValue(const char * caller, cdiResH resH, resOps * ops)
static listElem_t *
reshGetElem(const char *caller, cdiResH resH, resOps *ops)
{
listElem_t *listElem;
int nsp;
namespaceTuple_t nspT;
listElem_t * listElem;
xassert ( ops );
LIST_INIT();
......@@ -297,8 +297,13 @@ void *reshGetValue(const char * caller, cdiResH resH, resOps * ops)
if ( !(listElem && listElem->ops == ops) )
xabortC(caller, "Invalid resource handle %d, list element not found!",
(int)resH);
return listElem;
}
return listElem->val;
void *reshGetValue(const char * caller, cdiResH resH, resOps * ops)
{
return reshGetElem(caller, resH, ops)->val;
}
/**************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment