From: Matthew Fernandez Date: Sun, 7 Aug 2022 03:21:45 +0000 (-0700) Subject: gvpr pop: remove 'delete' parameter that is always 1 and unused 'head' X-Git-Tag: 5.0.1~15^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a442673faaeb1f8256874efa04cd66103744f22;p=graphviz gvpr pop: remove 'delete' parameter that is always 1 and unused 'head' --- diff --git a/lib/gvpr/queue.c b/lib/gvpr/queue.c index 457043bd2..790591565 100644 --- a/lib/gvpr/queue.c +++ b/lib/gvpr/queue.c @@ -69,16 +69,14 @@ void push(queue * nq, void *n) dtinsert(nq, &obj); } -void *pop(queue * nq, int delete) -{ +void *pop(queue *nq) { nsitem *obj; void *n; obj = dtfirst(nq); if (obj) { n = obj->np; - if (delete) - dtdelete(nq, 0); + dtdelete(nq, 0); return n; } else return 0; diff --git a/lib/gvpr/queue.h b/lib/gvpr/queue.h index bed779912..4080b4446 100644 --- a/lib/gvpr/queue.h +++ b/lib/gvpr/queue.h @@ -20,7 +20,7 @@ extern "C" { extern queue *mkQ(Dtmethod_t *); extern void push(queue *, void *); - extern void *pop(queue *, int remove); + extern void *pop(queue *); extern void freeQ(queue *); /* pseudo-functions: @@ -30,8 +30,7 @@ extern void* head(queue*); */ #define mkQueue() mkQ(Dtqueue) -#define pull(q) (pop(q,1)) -#define head(q) (pop(q,0)) +#define pull(q) (pop(q)) #ifdef __cplusplus }