Fix the test for SET_FOREACH termination.
Unlike the queue(3) _FOREACH macros, the iterator for a SET_FOREACH is not NULL after the end of the set is reached.
This commit is contained in:
parent
44981bb96d
commit
e1e7fa21c2
@ -498,7 +498,7 @@ compressor_init(compressor_cb_t cb, int format, size_t maxiosize, int level,
|
||||
if ((*iter)->format == format)
|
||||
break;
|
||||
}
|
||||
if (iter == NULL)
|
||||
if (iter == SET_LIMIT(compressors))
|
||||
return (NULL);
|
||||
|
||||
priv = (*iter)->init(maxiosize, level);
|
||||
|
Loading…
Reference in New Issue
Block a user