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:
Emmanuel Fleury 2020-09-10 18:05:40 +02:00
parent b696dccb20
commit 33bfae70ac

View File

@ -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