summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2021-12-07 10:16:25 +1100
committerTony Cook <tony@develop-help.com>2021-12-07 10:16:25 +1100
commit2669990f25f592df6dc48bd7fe0437e0d7211d0a (patch)
tree47067b5c91b2b776144ea1f72568c3b8ac691d85
parent8583af71bd4087f29b60dfddf852a6e27f26a8a9 (diff)
downloadperl-2669990f25f592df6dc48bd7fe0437e0d7211d0a.tar.gz
add {} around the now two lines introduced by f7f919a0
This turned out to be harmless, as sv_setpvn_fresh() does nothing when h_addr is NULL, but the call is also unnecessary when h_addr is NULL, and possibly confusing to future maintainers. CID 343917
-rw-r--r--pp_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index d67e0af469..db266879bf 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -5063,9 +5063,10 @@ PP(pp_ghostent)
PUSHs(sv = sv_newmortal());
if (hent) {
if (which == OP_GHBYNAME) {
- if (hent->h_addr)
+ if (hent->h_addr) {
sv_upgrade(sv, SVt_PV);
sv_setpvn_fresh(sv, hent->h_addr, hent->h_length);
+ }
}
else
sv_setpv(sv, (char*)hent->h_name);