summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-12-30 17:30:24 +0000
committerNicholas Clark <nick@ccl4.org>2010-12-30 17:30:24 +0000
commitfbcda526a9bbe2ee1302d6f4507b07f83661fc0d (patch)
tree302f9eb9b171ab88aa3140078d52932190a073f8 /pp_sys.c
parentdc8c4646c510896ec1292648fdb11164f9bb831f (diff)
downloadperl-fbcda526a9bbe2ee1302d6f4507b07f83661fc0d.tar.gz
Most socket ops weren't warning for unopened handles unless 'closed' was enabled
They were checking that category 'closed' was enabled for warnings before calling report_evil_fh(), which in turn was (correctly) checking category 'unopened'.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 23cdd5b7a9..d93cc8712b 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2500,8 +2500,7 @@ PP(pp_bind)
RETPUSHUNDEF;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(gv);
+ report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
#else
@@ -2530,8 +2529,7 @@ PP(pp_connect)
RETPUSHUNDEF;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(gv);
+ report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
#else
@@ -2556,8 +2554,7 @@ PP(pp_listen)
RETPUSHUNDEF;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(gv);
+ report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
#else
@@ -2632,8 +2629,7 @@ PP(pp_accept)
RETURN;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(ggv);
+ report_evil_fh(ggv);
SETERRNO(EBADF,SS_IVCHAN);
badexit:
@@ -2659,8 +2655,7 @@ PP(pp_shutdown)
RETURN;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(gv);
+ report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
RETPUSHUNDEF;
#else
@@ -2734,8 +2729,7 @@ PP(pp_ssockopt)
RETURN;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(gv);
+ report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
nuts2:
RETPUSHUNDEF;
@@ -2798,8 +2792,7 @@ PP(pp_getpeername)
RETURN;
nuts:
- if (ckWARN(WARN_CLOSED))
- report_evil_fh(gv);
+ report_evil_fh(gv);
SETERRNO(EBADF,SS_IVCHAN);
nuts2:
RETPUSHUNDEF;