summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-02-19 17:30:13 -0500
committerJoel Sherrill <joel@rtems.org>2021-02-26 16:56:07 -0600
commite5e58da6dfbdfa78ad499c2f52ec53c88538aa1c (patch)
tree9c9c4a09ec12bae91cbc96928508018e59f59b0b /cpukit
parentrecord-client.c: Fix Unchecked return value (CID #1456677) (diff)
downloadrtems-e5e58da6dfbdfa78ad499c2f52ec53c88538aa1c.tar.bz2
getgrent.c: Fix Unchecked return value error (CID #1459004)
CID 1459004: Unchecked return value in endgrent(). Closes #4261
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/getgrent.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/getgrent.c b/cpukit/libcsupport/src/getgrent.c
index b358cb947c..de564304d4 100644
--- a/cpukit/libcsupport/src/getgrent.c
+++ b/cpukit/libcsupport/src/getgrent.c
@@ -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);
}