1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
21 #include <sys/queue.h>
27 wordfree(wordexp_t
*pwordexp
)
34 if (pwordexp
->we_wordv
== NULL
)
37 wordv
= WE_WORDV_TO_EXT_WORDV(pwordexp
->we_wordv
);
38 while (!SLIST_EMPTY(&wordv
->list
)) {
39 struct ewords_entry
*entry
= SLIST_FIRST(&wordv
->list
);
40 SLIST_REMOVE_HEAD(&wordv
->list
, next
);
45 pwordexp
->we_wordv
= NULL
;
48 #endif /* !_NO_WORDEXP */