From abcbcc4d80a0ed0907ba123021478336e6ec4c4a Mon Sep 17 00:00:00 2001 From: doug Date: Sat, 13 Sep 2014 16:06:36 +0000 Subject: Replace all queue *_END macro calls except CIRCLEQ_END with NULL. CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@ --- usr.sbin/ftp-proxy/ftp-proxy.c | 4 ++-- usr.sbin/ldapd/namespace.c | 6 +++--- usr.sbin/ldomctl/config.c | 4 ++-- usr.sbin/ldomctl/mdstore.c | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c index 288e6b56673..0803e414019 100644 --- a/usr.sbin/ftp-proxy/ftp-proxy.c +++ b/usr.sbin/ftp-proxy/ftp-proxy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.28 2013/03/15 13:31:27 benno Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.29 2014/09/13 16:06:37 doug Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -322,7 +322,7 @@ exit_daemon(void) { struct session *s, *next; - for (s = LIST_FIRST(&sessions); s != LIST_END(&sessions); s = next) { + for (s = LIST_FIRST(&sessions); s != NULL; s = next) { next = LIST_NEXT(s, entry); end_session(s); } diff --git a/usr.sbin/ldapd/namespace.c b/usr.sbin/ldapd/namespace.c index 2a3ebd4d76b..23fb2c3b33b 100644 --- a/usr.sbin/ldapd/namespace.c +++ b/usr.sbin/ldapd/namespace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: namespace.c,v 1.12 2012/06/16 00:08:32 jmatthew Exp $ */ +/* $OpenBSD: namespace.c,v 1.13 2014/09/13 16:06:37 doug Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk @@ -526,8 +526,8 @@ namespace_cancel_conn(struct conn *conn) struct request *req, *next; TAILQ_FOREACH(ns, &conf->namespaces, next) { - for (req = TAILQ_FIRST(&ns->request_queue); - req != TAILQ_END(&ns->request_queue); req = next) { + for (req = TAILQ_FIRST(&ns->request_queue); req != NULL; + req = next) { next = TAILQ_NEXT(req, next); if (req->conn == conn) { diff --git a/usr.sbin/ldomctl/config.c b/usr.sbin/ldomctl/config.c index 5d538bdfe57..d7f8b6bd8b4 100644 --- a/usr.sbin/ldomctl/config.c +++ b/usr.sbin/ldomctl/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.19 2013/05/08 00:15:03 gsoares Exp $ */ +/* $OpenBSD: config.c,v 1.20 2014/09/13 16:06:37 doug Exp $ */ /* * Copyright (c) 2012 Mark Kettenis @@ -433,7 +433,7 @@ hvmd_alloc_frag(uint64_t base) } } - if (frag == TAILQ_END(&free_frags)) + if (frag == NULL) return -1; TAILQ_REMOVE(&free_frags, frag, link); diff --git a/usr.sbin/ldomctl/mdstore.c b/usr.sbin/ldomctl/mdstore.c index 88e3ebf7fa1..80607d6d5bd 100644 --- a/usr.sbin/ldomctl/mdstore.c +++ b/usr.sbin/ldomctl/mdstore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdstore.c,v 1.6 2012/11/24 23:02:43 kettenis Exp $ */ +/* $OpenBSD: mdstore.c,v 1.7 2014/09/13 16:06:37 doug Exp $ */ /* * Copyright (c) 2012 Mark Kettenis @@ -269,7 +269,7 @@ mdstore_select(struct ds_conn *dc, const char *name) TAILQ_FOREACH(dcs, &dc->services, link) if (strcmp(dcs->service->ds_svc_id, "mdstore") == 0) break; - assert(dcs != TAILQ_END(&dc->services)); + assert(dcs != NULL); mr = xzalloc(len); mr->msg_type = DS_DATA; @@ -297,7 +297,7 @@ mdstore_delete(struct ds_conn *dc, const char *name) TAILQ_FOREACH(dcs, &dc->services, link) if (strcmp(dcs->service->ds_svc_id, "mdstore") == 0) break; - assert(dcs != TAILQ_END(&dc->services)); + assert(dcs != NULL); mr = xzalloc(len); mr->msg_type = DS_DATA; @@ -335,7 +335,7 @@ mdstore_download(struct ds_conn *dc, const char *name) TAILQ_FOREACH(dcs, &dc->services, link) if (strcmp(dcs->service->ds_svc_id, "mdstore") == 0) break; - assert(dcs != TAILQ_END(&dc->services)); + assert(dcs != NULL); if (asprintf(&path, "%s/hv.md", name) == -1) err(1, "asprintf"); -- cgit v1.2.3-59-g8ed1b