mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pulse-server: use S_ISDIR()
Use the `S_ISDIR()` macro instead of `S_IFMT` and bitwise operations to make the code simpler.
This commit is contained in:
parent
e90a70fd49
commit
2d27497045
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ int get_runtime_dir(char *buf, size_t buflen, const char *dir)
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
pw_log_info(NAME": created %s", buf);
|
pw_log_info(NAME": created %s", buf);
|
||||||
} else if ((stat_buf.st_mode & S_IFMT) != S_IFDIR) {
|
} else if (!S_ISDIR(stat_buf.st_mode)) {
|
||||||
pw_log_error(NAME": %s is not a directory", buf);
|
pw_log_error(NAME": %s is not a directory", buf);
|
||||||
return -ENOTDIR;
|
return -ENOTDIR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue