freebsd-src/lib/libc/stdlib/remque.c
Warner Losh 559a218c9b libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385
2023-11-01 16:44:30 -06:00

28 lines
534 B
C

/*
* Initial implementation:
* Copyright (c) 2002 Robert Drehmel
* All rights reserved.
*
* As long as the above copyright statement and this notice remain
* unchanged, you can do what ever you want with this file.
*/
#define _SEARCH_PRIVATE
#include <search.h>
#include <stdlib.h> /* for NULL */
void
remque(void *element)
{
struct que_elem *prev, *next, *elem;
elem = (struct que_elem *)element;
prev = elem->prev;
next = elem->next;
if (prev != NULL)
prev->next = next;
if (next != NULL)
next->prev = prev;
}