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
parent
9fbae6f6ad
commit
5ab6031699
|
@ -696,7 +696,7 @@ static int drmOpenByName(const char *name, int type)
|
||||||
int retcode;
|
int retcode;
|
||||||
|
|
||||||
sprintf(proc_name, "/proc/dri/%d/name", i);
|
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);
|
retcode = read(fd, buf, sizeof(buf)-1);
|
||||||
close(fd);
|
close(fd);
|
||||||
if (retcode) {
|
if (retcode) {
|
||||||
|
|
Loading…
Reference in New Issue