diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-02 17:58:40 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-02 17:58:40 +0000 |
commit | e51247d70ea509672af45449721a8b0f467c82c7 (patch) | |
tree | acfca573eb4b7e74c2c1a4855059b06e6403999f | |
parent | d365829c658be59c15825bd4efd260caa7cfd19b (diff) | |
download | ATCD-e51247d70ea509672af45449721a8b0f467c82c7.tar.gz |
no need for a temporary: reset status before printing out
-rw-r--r-- | tests/SOCK_Connector_Test.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/SOCK_Connector_Test.cpp b/tests/SOCK_Connector_Test.cpp index b145a59b246..4f0b197ff45 100644 --- a/tests/SOCK_Connector_Test.cpp +++ b/tests/SOCK_Connector_Test.cpp @@ -164,14 +164,13 @@ succeed_nonblocking (void) if (status == -1) { - // In cast the errno gets overwritten by the printout. It - // does on LynxOS 2.5.0. - const int saved_errno = errno; + // Reset the status _before_ doing the printout, in case the + // printout overwrites errno. + if (errno == ECONNREFUSED || errno == ENOTCONN) + status = 0; ACE_DEBUG ((LM_DEBUG, ASYS_TEXT("%p\n"), ASYS_TEXT("connect:complete"))); - if (saved_errno == ECONNREFUSED || errno == ENOTCONN) - status = 0; } else ACE_DEBUG((LM_DEBUG, |