opnsense-src/lib/libc/stdlib/remque.c
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00

28 lines
557 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.
*/
#include <sys/cdefs.h>
#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;
}