getgrent.c: Fix Unchecked return value error (CID #1459004)

CID 1459004: Unchecked return value in endgrent().

Closes #4261
This commit is contained in:
Ryan Long
2021-02-19 17:30:13 -05:00
committed by Joel Sherrill
parent be3b87d471
commit e5e58da6df

View File

@@ -95,6 +95,7 @@ void setgrent(void)
void endgrent(void)
{
grp_context *ctx = grp_get_context();
int sc;
if (ctx == NULL)
return;
@@ -104,5 +105,6 @@ void endgrent(void)
}
free(ctx);
pthread_setspecific(grp_key, NULL);
sc = pthread_setspecific(grp_key, NULL);
_Assert_Unused_variable_equals(sc, 0);
}