From 1759c16ab9b64598968a0058039e8a66bf5f9773 Mon Sep 17 00:00:00 2001 From: David Dawes Date: Mon, 9 Apr 2001 16:27:54 +0000 Subject: Import -f XFree86 4.0.99.2 --- bsd/drm/auth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bsd/drm/auth.c') diff --git a/bsd/drm/auth.c b/bsd/drm/auth.c index a2699011..37d17be5 100644 --- a/bsd/drm/auth.c +++ b/bsd/drm/auth.c @@ -135,12 +135,12 @@ int drm_getmagic(dev_t kdev, u_long cmd, caddr_t data, if (priv->magic) { auth.magic = priv->magic; } else { - simple_lock(&lock); do { + simple_lock(&lock); if (!sequence) ++sequence; /* reserve 0 */ auth.magic = sequence++; - } while (drm_find_file(dev, auth.magic)); simple_unlock(&lock); + } while (drm_find_file(dev, auth.magic)); priv->magic = auth.magic; drm_add_magic(dev, priv, auth.magic); } -- cgit v1.2.3