mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-25 19:37:52 +02:00
minor optimization.
Wed Mar 1 10:39:39 2000 Tim Janik <timj@gtk.org> * gslist.c (g_slist_reverse): minor optimization. * testglib.c (g_node_test): added a couple of tests for g_node_copy(). * glib.h: * gnode.c (g_node_copy): new function to copy subtrees, supplied by dbsears@ix.netcom.com. changed iterator to walk the children list backwards, so we get down from O(n^2) to O(n). * gnode.c (g_node_first_sibling): applied patch from dbsears@ix.netcom.com to optimize access if node->parent is present. * gutils.c (g_get_any_init): backed out HAVE_PW_GECOS check around assignment of g_real_name, sicne HAVE_PW_GECOS is never defined and thus breaks the original code. * merged changes from 1.2.7. Sat Feb 19 19:43:29 2000 Tim Janik <timj@gtk.org> * testgmodule.c (main): added test to check that not yet bound symbols in shared libraries of the main module are retrievable, from David Gero. Fri Jan 28 11:37:41 2000 Owen Taylor <otaylor@redhat.com> Bug #4156 - Changes vaguely modelled after Scott Gifford's patch * gtimer.c (g_timer_elapsed): Never report negative times - clip times to 0. * gmain.c (g_timeout_prepare): Guard against unexpected clock shifts by never setting a timeout of more than data->interval msecs.
This commit is contained in:
@@ -515,8 +515,8 @@ g_get_any_init (void)
|
||||
*/
|
||||
if (error == 0 || error == ENOENT)
|
||||
{
|
||||
g_warning ("getpwuid_r(): failed due to: "
|
||||
"No such user: %lu.", (unsigned long)getuid ());
|
||||
g_warning ("getpwuid_r(): failed due to unknown user id (%lu)",
|
||||
(gulong) getuid ());
|
||||
break;
|
||||
}
|
||||
if (bufsize > 32 * 1024)
|
||||
@@ -541,11 +541,7 @@ g_get_any_init (void)
|
||||
if (pw)
|
||||
{
|
||||
g_user_name = g_strdup (pw->pw_name);
|
||||
#ifdef HAVE_PW_GECOS
|
||||
g_real_name = g_strdup (pw->pw_gecos);
|
||||
#else
|
||||
g_real_name = g_strdup (g_user_name);
|
||||
#endif
|
||||
if (!g_home_dir)
|
||||
g_home_dir = g_strdup (pw->pw_dir);
|
||||
}
|
||||
|
Reference in New Issue
Block a user