mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +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;
|
struct passwd *pw = NULL;
|
||||||
gpointer buffer = NULL;
|
gpointer buffer = NULL;
|
||||||
gint error;
|
gint error;
|
||||||
gchar *logname;
|
const char *logname;
|
||||||
|
|
||||||
# if defined (HAVE_GETPWUID_R)
|
# if defined (HAVE_GETPWUID_R)
|
||||||
struct passwd pwd;
|
struct passwd pwd;
|
||||||
# ifdef _SC_GETPW_R_SIZE_MAX
|
# ifdef _SC_GETPW_R_SIZE_MAX
|
||||||
/* This reurns the maximum length */
|
/* This returns the maximum length */
|
||||||
glong bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
|
glong bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);
|
||||||
|
|
||||||
if (bufsize < 0)
|
if (bufsize < 0)
|
||||||
@ -678,7 +678,7 @@ g_get_user_database_entry (void)
|
|||||||
glong bufsize = 64;
|
glong bufsize = 64;
|
||||||
# endif /* _SC_GETPW_R_SIZE_MAX */
|
# endif /* _SC_GETPW_R_SIZE_MAX */
|
||||||
|
|
||||||
logname = (gchar *) g_getenv ("LOGNAME");
|
logname = g_getenv ("LOGNAME");
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user