summaryrefslogtreecommitdiff
path: root/app/video
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2021-10-25 09:30:34 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2021-10-25 09:30:34 +0000
commit6cb581d1da73c851a6a2ad535f33a9745dc07217 (patch)
tree39ffc9a64f6e34ee3c0536d207a40ec120ad85f7 /app/video
parente46ac0341c6f0ef544a483ae86a36a04bab84052 (diff)
Remove 3rd argument to open() when flags don't include O_CREAT
ok deraadt@ ian@
Diffstat (limited to 'app/video')
-rw-r--r--app/video/video.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/video/video.c b/app/video/video.c
index 2cd9672a2..247adac78 100644
--- a/app/video/video.c
+++ b/app/video/video.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: video.c,v 1.40 2021/02/16 13:57:41 mglocker Exp $ */
+/* $OpenBSD: video.c,v 1.41 2021/10/25 09:30:33 matthieu Exp $ */
/*
* Copyright (c) 2010 Jacob Meuser <jakemsr@openbsd.org>
*
@@ -784,7 +784,7 @@ dev_check_caps(struct video *vid)
struct dev *d = &vid->dev;
struct v4l2_capability cap;
- if ((d->fd = open(d->path, O_RDWR, 0)) < 0) {
+ if ((d->fd = open(d->path, O_RDWR)) < 0) {
warn("%s", d->path);
return 0;
}
@@ -1624,7 +1624,7 @@ setup(struct video *vid)
if (!strcmp(vid->iofile, "-"))
vid->iofile_fd = STDIN_FILENO;
else
- vid->iofile_fd = open(vid->iofile, O_RDONLY, 0);
+ vid->iofile_fd = open(vid->iofile, O_RDONLY);
} else if (vid->mode & M_OUT_FILE) {
if (!strcmp(vid->iofile, "-"))
vid->iofile_fd = STDOUT_FILENO;