summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-07-17 23:29:15 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-07-17 23:29:15 +0000
commit9169229b986d1a3a3b5fc88c635cbd9e4fd04008 (patch)
tree58d3cef6347a1c0678758035085388198b66e3dc /sys/dev
parent9bc21a3ae031a43280d174872c6eaac08829c6a4 (diff)
add missing braces to only call selrecord when intended to
ok deraadt@ millert@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/video.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/video.c b/sys/dev/video.c
index bb210af2d89..85f54165358 100644
--- a/sys/dev/video.c
+++ b/sys/dev/video.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: video.c,v 1.35 2015/02/10 21:56:09 miod Exp $ */
+/* $OpenBSD: video.c,v 1.36 2015/07/17 23:29:14 jsg Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -341,7 +341,7 @@ videopoll(dev_t dev, int events, struct proc *p)
revents |= events & (POLLIN | POLLRDNORM);
}
if (revents == 0) {
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
/*
* Start the stream in read() mode if not already
* started. If the user wanted mmap() mode,
@@ -355,6 +355,7 @@ videopoll(dev_t dev, int events, struct proc *p)
sc->sc_vidmode = VIDMODE_READ;
}
selrecord(p, &sc->sc_rsel);
+ }
}
DPRINTF(("%s: revents=0x%x\n", __func__, revents));