patchset
1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec tested for
an empty queue but what is really required is a test for end of
queue after the queue_Scan(). If the queue_Scan() completes
at the end of the queue, in other words, pointing at the list
head, then return NULL because no match was found.
Change-Id: I444531d3cfa85b4691eaa8960da0266de82a03a3
Reviewed-on: http://gerrit.openafs.org/7886
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
{
rx_interface_stat_p rpc_stat, nrpc_stat;
- if (queue_IsEmpty(stats) && !create)
- return NULL;
-
/*
* See if there's already a structure for this interface
*/
}
/* if they didn't ask us to create, we're done */
- if (!create)
- return rpc_stat;
+ if (!create) {
+ if (queue_IsEnd(stats, rpc_stat))
+ return NULL;
+ else
+ return rpc_stat;
+ }
/* can't proceed without these */
if (!totalFunc || !counter)