diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2004-09-28 20:26:28 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2004-09-28 20:26:28 +0000 |
commit | e996d4847d9fed14f271fdb8c44a28b6c1b7c638 (patch) | |
tree | 69a04d02213054be9429a64088d1b6cdad850903 /usr.sbin/lpr | |
parent | b0f3a042cf5881791b49f317e4e3029b2bf3dbc5 (diff) |
Simpler loop to free queue items. OK otto@
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r-- | usr.sbin/lpr/common_source/common.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c index cc9157619d6..f9e6f17fcd1 100644 --- a/usr.sbin/lpr/common_source/common.c +++ b/usr.sbin/lpr/common_source/common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: common.c,v 1.27 2004/09/28 15:54:50 otto Exp $ */ +/* $OpenBSD: common.c,v 1.28 2004/09/28 20:26:27 millert Exp $ */ /* $NetBSD: common.c,v 1.21 2000/08/09 14:28:50 itojun Exp $ */ /* @@ -39,7 +39,7 @@ #if 0 static const char sccsid[] = "@(#)common.c 8.5 (Berkeley) 4/28/95"; #else -static const char rcsid[] = "$OpenBSD: common.c,v 1.27 2004/09/28 15:54:50 otto Exp $"; +static const char rcsid[] = "$OpenBSD: common.c,v 1.28 2004/09/28 20:26:27 millert Exp $"; #endif #endif /* not lint */ @@ -303,10 +303,8 @@ getq(struct queue ***namelist) errdone: if (queue != NULL) { - size_t i; - - for (i = 0; i < nitems; i++) - free(queue[i]); + while (nitems--) + free(queue[nitems]); free(queue); } closedir(dirp); |