diff options
author | Zefram <zefram@fysh.org> | 2017-11-11 23:58:32 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-11-11 23:58:32 +0000 |
commit | 69374fe705978962b85217f3eb828a93f836fd8d (patch) | |
tree | 35cdfe3f00740ca6ee7540d3b02ac5e04d7e1f7e /perl.c | |
parent | b8897079199ab3165b21ca3aff78c7479842181a (diff) | |
download | perl-69374fe705978962b85217f3eb828a93f836fd8d.tar.gz |
avoid reading errno twice in a row
Reading errno can involve calling a function and indirecting through
its result, so cache the value of errno where possible. [perl #122096]
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5231,8 +5231,9 @@ Perl_my_failure_exit(pTHX) #else int exitstatus; - if (errno & 255) - STATUS_UNIX_SET(errno); + int eno = errno; + if (eno & 255) + STATUS_UNIX_SET(eno); else { exitstatus = STATUS_UNIX >> 8; if (exitstatus & 255) |