From bfafe548060cd1a3a331f39c058eef43eb86159d Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Mon, 20 Jul 2009 13:33:09 +0200 Subject: [PATCH] dma: correct logic for setting the locked flag --- libexec/dma/spool.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libexec/dma/spool.c b/libexec/dma/spool.c index 8489234813..ae3c9879a3 100644 --- a/libexec/dma/spool.c +++ b/libexec/dma/spool.c @@ -227,9 +227,11 @@ load_queue(struct queue *queue, int ignorelock) goto fail; fd = open_locked(queuefn, O_RDONLY|O_NONBLOCK); - if (ignorelock && fd < 0) { - fd = open(queuefn, O_RDONLY); - locked = 0; + if (ignorelock) { + if (fd < 0) + fd = open(queuefn, O_RDONLY); + else + locked = 0; } if (fd < 0) { /* Ignore locked files */ -- 2.11.4.GIT