mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
gutils: Make a variable const to avoid an unnecessary cast
And fix a typo in a comment. This introduces no functional changes. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
7420f9eccd
commit
f3064e8a5c
@ -664,12 +664,12 @@ g_get_user_database_entry (void)
|
||||
struct passwd *pw = NULL;
|
||||
gpointer buffer = NULL;
|
||||
gint error;
|
||||
gchar *logname;
|
||||
const char *logname;
|
||||
|
||||
# if defined (HAVE_GETPWUID_R)
|
||||
struct passwd pwd;
|
||||
# ifdef _SC_GETPW_R_SIZE_MAX
|
||||
/* This reurns the maximum length */
|
||||
/* This returns the maximum length */
|
||||
glong bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||
|
||||
if (bufsize < 0)
|
||||
@ -678,7 +678,7 @@ g_get_user_database_entry (void)
|
||||
glong bufsize = 64;
|
||||
# endif /* _SC_GETPW_R_SIZE_MAX */
|
||||
|
||||
logname = (gchar *) g_getenv ("LOGNAME");
|
||||
logname = g_getenv ("LOGNAME");
|
||||
|
||||
do
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user