summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-05-27 19:28:04 +0000
committered <ed@FreeBSD.org>2009-05-27 19:28:04 +0000
commit3779b68747cdae9d6e156307aae1ecb97b52d4ea (patch)
tree6d3ce9791e7680277093a1a296bcbea3aaeb6040 /lib
parent9fc2aafa8283c2dc1af8bfbfd1d727b16c0837d2 (diff)
downloadFreeBSD-src-3779b68747cdae9d6e156307aae1ecb97b52d4ea.zip
FreeBSD-src-3779b68747cdae9d6e156307aae1ecb97b52d4ea.tar.gz
Rename the queue macros I introduced last year.
Last year I added SLIST_REMOVE_NEXT and STAILQ_REMOVE_NEXT, to remove entries behind an element in the list, using O(1) time. I recently discovered NetBSD also has a similar macro, called SLIST_REMOVE_AFTER. In my opinion this approach is a lot better: - It doesn't have the unused first argument of the list pointer. I added this, mainly because OpenBSD also had it. - The _AFTER suffix makes a lot more sense, because it is related to SLIST_INSERT_AFTER. _NEXT is only used to iterate through the list. The reason why I want to rename this now, is to make sure we don't release a major version with the badly named macros.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/popen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/popen.c b/lib/libc/gen/popen.c
index f3450b5..b123234 100644
--- a/lib/libc/gen/popen.c
+++ b/lib/libc/gen/popen.c
@@ -191,7 +191,7 @@ pclose(iop)
if (last == NULL)
SLIST_REMOVE_HEAD(&pidlist, next);
else
- SLIST_REMOVE_NEXT(&pidlist, last, next);
+ SLIST_REMOVE_AFTER(last, next);
THREAD_UNLOCK();
(void)fclose(iop);
OpenPOWER on IntegriCloud