Author: markj Date: Thu Feb 15 17:35:40 2018 New Revision: 329325 URL: https://svnweb.freebsd.org/changeset/base/329325
Log: 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. Modified: head/sys/kern/subr_compressor.c Modified: head/sys/kern/subr_compressor.c ============================================================================== --- head/sys/kern/subr_compressor.c Thu Feb 15 17:27:34 2018 (r329324) +++ head/sys/kern/subr_compressor.c Thu Feb 15 17:35:40 2018 (r329325) @@ -498,7 +498,7 @@ compressor_init(compressor_cb_t cb, int format, size_t if ((*iter)->format == format) break; } - if (iter == NULL) + if (iter == SET_LIMIT(compressors)) return (NULL); priv = (*iter)->init(maxiosize, level); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"