mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
Fix signedness problem in glib/gutils.c
glib/gutils.c:998:26: error: comparison of integer expressions of different signedness: ‘glong’ {aka ‘long int’} and ‘long unsigned int’ 998 | if (max > 0 && max <= G_MAXSIZE - 1) | ^~
This commit is contained in:
parent
b696dccb20
commit
33bfae70ac
@ -995,7 +995,7 @@ g_get_host_name (void)
|
|||||||
|
|
||||||
#ifdef _SC_HOST_NAME_MAX
|
#ifdef _SC_HOST_NAME_MAX
|
||||||
max = sysconf (_SC_HOST_NAME_MAX);
|
max = sysconf (_SC_HOST_NAME_MAX);
|
||||||
if (max > 0 && max <= G_MAXSIZE - 1)
|
if (max > 0 && (gsize) max <= G_MAXSIZE - 1)
|
||||||
size = (gsize) max + 1;
|
size = (gsize) max + 1;
|
||||||
else
|
else
|
||||||
#ifdef HOST_NAME_MAX
|
#ifdef HOST_NAME_MAX
|
||||||
|
Loading…
Reference in New Issue
Block a user