HomeFreeBSD

qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END()

Description

qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END()

We provide these for compat with other queue.h headers since some software
assumes it exists (e.g. the libevent contrib code), but we are not
encouraging their use (NULL should be used instead).

This fixes the following warning (which should arguable be an error since
it results in a function call to an undefined function):

.../contrib/libevent/buffer.c:495:16: warning: implicit declaration of function 'LIST_END' is invalid in C99 [-Wimplicit-function-declaration]

cbent != LIST_END(&buffer->callbacks);
         ^

.../contrib/libevent/buffer.c:495:13: warning: comparison between pointer and integer ('struct evbuffer_cb_entry *' and 'int') [-Wpointer-integer-compare]

cbent != LIST_END(&buffer->callbacks);
~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reviewed By: jhb
Differential Revision: https://reviews.freebsd.org/D27151

(cherry picked from commit 8d55837dc1331a5cdacad539b1788ab1070159b4)

Details

Provenance
arichardsonAuthored on Jan 25 2021, 2:11 PM
Reviewer
jhb
Differential Revision
D27151: qeueue.h: Add {SLIST,STAILQ,LIST,TAILQ}_END()
Parents
rGa00bf7d9bba1: Make DataSN counter of solicited Data-Out local.
Branches
Unknown
Tags
Unknown