From 5ab6031699a2f51ab5ec5c0ce95230d2de9e74db Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 28 May 2020 17:17:26 +0200 Subject: [PATCH] core: use `O_RDONLY` instead of ambiguous `0` flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Reviewed-by: Michel Dänzer --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drm.c b/xf86drm.c index b49d42f7..07a18c44 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -696,7 +696,7 @@ static int drmOpenByName(const char *name, int type) int retcode; sprintf(proc_name, "/proc/dri/%d/name", i); - if ((fd = open(proc_name, 0, 0)) >= 0) { + if ((fd = open(proc_name, O_RDONLY, 0)) >= 0) { retcode = read(fd, buf, sizeof(buf)-1); close(fd); if (retcode) {