mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
utils: avoid redundant set/endpwent around getpwuid
set/endpwent are only required for iterating through passwd entries using getpwent(). Since we are explicitly requesting a passwd entry for a uid then the set/endpwent calls are redundant. Removing these redundant calls is required for building on Android since their C library doesn't implement these. https://bugzilla.gnome.org/show_bug.cgi?id=645881
This commit is contained in:
parent
d171e83347
commit
c70b497859
@ -743,13 +743,7 @@ g_get_user_database_entry (void)
|
||||
|
||||
if (!pw)
|
||||
{
|
||||
#ifndef __BIONIC__
|
||||
setpwent ();
|
||||
#endif
|
||||
pw = getpwuid (getuid ());
|
||||
#ifndef __BIONIC__
|
||||
endpwent ();
|
||||
#endif
|
||||
}
|
||||
if (pw)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user