mirror of OpenBSD xenocara tree github.com/openbsd/xenocara
openbsd
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove 3rd argument to open() when flags don't include O_CREAT

ok deraadt@ ian@

matthieu 59a8bd4e 9d386831

+7 -7
+3 -3
app/video/video.c
··· 1 - /* $OpenBSD: video.c,v 1.40 2021/02/16 13:57:41 mglocker Exp $ */ 1 + /* $OpenBSD: video.c,v 1.41 2021/10/25 09:30:33 matthieu Exp $ */ 2 2 /* 3 3 * Copyright (c) 2010 Jacob Meuser <jakemsr@openbsd.org> 4 4 * ··· 784 784 struct dev *d = &vid->dev; 785 785 struct v4l2_capability cap; 786 786 787 - if ((d->fd = open(d->path, O_RDWR, 0)) < 0) { 787 + if ((d->fd = open(d->path, O_RDWR)) < 0) { 788 788 warn("%s", d->path); 789 789 return 0; 790 790 } ··· 1624 1624 if (!strcmp(vid->iofile, "-")) 1625 1625 vid->iofile_fd = STDIN_FILENO; 1626 1626 else 1627 - vid->iofile_fd = open(vid->iofile, O_RDONLY, 0); 1627 + vid->iofile_fd = open(vid->iofile, O_RDONLY); 1628 1628 } else if (vid->mode & M_OUT_FILE) { 1629 1629 if (!strcmp(vid->iofile, "-")) 1630 1630 vid->iofile_fd = STDOUT_FILENO;
+2 -2
app/xidle/xidle.c
··· 1 - /* $OpenBSD: xidle.c,v 1.9 2019/04/02 14:16:37 kn Exp $ */ 1 + /* $OpenBSD: xidle.c,v 1.10 2021/10/25 09:30:33 matthieu Exp $ */ 2 2 /* 3 3 * Copyright (c) 2005 Federico G. Schwindt 4 4 * Copyright (c) 2005 Claudio Castiglia ··· 345 345 signal(SIGTERM, handler); 346 346 signal(SIGUSR1, handler); 347 347 348 - fd = open(_PATH_DEVNULL, O_RDWR, 0); 348 + fd = open(_PATH_DEVNULL, O_RDWR); 349 349 if (fd < 0) 350 350 err(1, _PATH_DEVNULL); 351 351 dup2(fd, STDIN_FILENO);
+2 -2
app/xpr/xpr.c
··· 700 700 } 701 701 702 702 if (infilename) { 703 - f = open(infilename, O_RDONLY|O_BINARY, 0); 703 + f = open(infilename, O_RDONLY|O_BINARY); 704 704 if (f < 0) { 705 705 fprintf(stderr, "xpr: error opening \"%s\" for input\n", 706 706 infilename); ··· 716 716 if (!(*flags & F_APPEND)) { 717 717 f = open(output_filename, O_CREAT|O_WRONLY|O_TRUNC, 0664); 718 718 } else { 719 - f = open(output_filename, O_WRONLY, 0); 719 + f = open(output_filename, O_WRONLY); 720 720 } 721 721 if (f < 0) { 722 722 fprintf(stderr, "xpr: error opening \"%s\" for output\n",