From c41d09cb1ce845c96079c6bc1e204e62caf32b95 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 17 Dec 2012 14:32:39 +0000 Subject: create and use menuq_clear() helper; from Tiago Cunha --- group.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'group.c') diff --git a/group.c b/group.c index 386fdc9..4c268c7 100644 --- a/group.c +++ b/group.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: group.c,v 1.64 2012/11/29 04:25:49 okan Exp $ + * $OpenBSD: group.c,v 1.65 2012/12/17 14:32:39 okan Exp $ */ #include @@ -385,10 +385,7 @@ group_menu(XButtonEvent *e) (gc->hidden) ? group_show(sc, gc) : group_hide(sc, gc); cleanup: - while ((mi = TAILQ_FIRST(&menuq)) != NULL) { - TAILQ_REMOVE(&menuq, mi, entry); - free(mi); - } + menuq_clear(&menuq); } void -- cgit v1.2.3-2-gb3c3