mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
util: simplify logic in __normal_user()
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27378>
(cherry picked from commit afd4e633ee)
This commit is contained in:
parent
3f4fa5b839
commit
3c8490a877
2 changed files with 5 additions and 5 deletions
|
|
@ -214,7 +214,7 @@
|
|||
"description": "util: simplify logic in __normal_user()",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -396,11 +396,11 @@ debug_get_option_ ## suffix (void) \
|
|||
static inline bool
|
||||
__normal_user(void)
|
||||
{
|
||||
#if !defined(_WIN32)
|
||||
if (geteuid() != getuid())
|
||||
return false;
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
return true;
|
||||
#else
|
||||
return geteuid() == getuid();
|
||||
#endif
|
||||
}
|
||||
|
||||
#define DEBUG_GET_ONCE_BOOL_OPTION(sufix, name, dfault) \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue