summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-06-24 21:23:06 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-06-26 23:09:47 -0400
commitee17bffdbc48ec774ffebf56029d2c0fe49aef13 (patch)
treefadbc3f9341ba875d473a173ea05dccd886df76d /pp_sys.c
parent27e6dabe2abcb106f9dd28e976fdb26ca016ed53 (diff)
downloadperl-ee17bffdbc48ec774ffebf56029d2c0fe49aef13.tar.gz
gid_t signedness.
Coverity CID 104786.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 6435781cb2..4f337f0372 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -5506,7 +5506,13 @@ PP(pp_ggrent)
grent = (const struct group *)getgrnam(name);
}
else if (which == OP_GGRGID) {
+#if Gid_t_sign == 1
+ const Gid_t gid = POPu;
+#elif Gid_t_sign == -1
const Gid_t gid = POPi;
+#else
+# error "Unexpected Gid_t_sign"
+#endif
grent = (const struct group *)getgrgid(gid);
}
else