summaryrefslogtreecommitdiff
path: root/xf86drm.c
diff options
context:
space:
mode:
authorEric Engestrom <eric@engestrom.ch>2020-05-28 17:17:26 +0200
committerEric Engestrom <eric@engestrom.ch>2020-05-28 17:17:26 +0200
commit5ab6031699a2f51ab5ec5c0ce95230d2de9e74db (patch)
tree7469cd4445988b0425ee6dd28ce4888c46baf0ae /xf86drm.c
parent9fbae6f6ad7994240e25e7823573604d4a9be4c4 (diff)
downloadlibdrm-5ab6031699a2f51ab5ec5c0ce95230d2de9e74db.tar.gz
libdrm-5ab6031699a2f51ab5ec5c0ce95230d2de9e74db.tar.bz2
libdrm-5ab6031699a2f51ab5ec5c0ce95230d2de9e74db.zip
core: use `O_RDONLY` instead of ambiguous `0` flag
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r--xf86drm.c2
1 files changed, 1 insertions, 1 deletions
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) {