summaryrefslogtreecommitdiff
path: root/bsd/drm/auth.c
diff options
context:
space:
mode:
authorDavid Dawes <dawes@xfree86.org>2001-04-09 16:27:54 +0000
committerDavid Dawes <dawes@xfree86.org>2001-04-09 16:27:54 +0000
commit1759c16ab9b64598968a0058039e8a66bf5f9773 (patch)
treea82d44dc47302041daf1f5f408c6f47017baac47 /bsd/drm/auth.c
parent0e7f6c0726e5ff08eeab8e17a5aa63fbe44b3410 (diff)
Import -f XFree86 4.0.99.2
Diffstat (limited to 'bsd/drm/auth.c')
-rw-r--r--bsd/drm/auth.c4
1 files changed, 2 insertions, 2 deletions
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);
}