- Fix variable type for saving nagative return
Change-Id: I2b01f765c3830b54561bfdba4776368c4489d0f3
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
struct group buf_group;
gchar *buf = NULL;
gchar *tmp = NULL;
- gsize buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
- if (buflen<sizeof(struct group))
+ gsize buflen = 0;
+ long gr_max = sysconf(_SC_GETGR_R_SIZE_MAX);
+ if (gr_max < sizeof(struct group))
buflen = 1024;
+ else
+ buflen = gr_max;
#if !GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();