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>
main
Eric Engestrom 2020-05-28 17:17:26 +02:00
parent 9fbae6f6ad
commit 5ab6031699
1 changed files with 1 additions and 1 deletions

View File

@ -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) {