summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doio.c b/doio.c
index 6135efa46d..2e5947f9c3 100644
--- a/doio.c
+++ b/doio.c
@@ -1981,7 +1981,7 @@ Perl_do_ipcget(pTHX_ I32 optype, SV **mark, SV **sp)
{
dVAR;
const key_t key = (key_t)SvNVx(*++mark);
- const I32 n = (optype == OP_MSGGET) ? 0 : SvIVx(*++mark);
+ SV *nsv = optype == OP_MSGGET ? NULL : *++mark;
const I32 flags = SvIVx(*++mark);
PERL_ARGS_ASSERT_DO_IPCGET;
@@ -1996,11 +1996,11 @@ Perl_do_ipcget(pTHX_ I32 optype, SV **mark, SV **sp)
#endif
#ifdef HAS_SEM
case OP_SEMGET:
- return semget(key, n, flags);
+ return semget(key, (int) SvIV(nsv), flags);
#endif
#ifdef HAS_SHM
case OP_SHMGET:
- return shmget(key, n, flags);
+ return shmget(key, (size_t) SvUV(nsv), flags);
#endif
#if !defined(HAS_MSG) || !defined(HAS_SEM) || !defined(HAS_SHM)
default: