diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-11 07:34:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-11 07:34:51 +0200 |
commit | d3e82e18b3f597c5913954d8a24f5023ff55fa52 (patch) | |
tree | 7d69e52aa70bda28ab3d672063d9e0bee24f5f52 /lib/psocksxx/sockstreambuf.cpp | |
parent | 380a9a3ff3a376cfe768033375663e934516e4a6 (diff) | |
parent | f6b346a25e872df149886713e8056725726f5ac1 (diff) |
Merge branch 'release/debian/1.1.1-1'debian/1.1.1-1
Diffstat (limited to 'lib/psocksxx/sockstreambuf.cpp')
-rw-r--r-- | lib/psocksxx/sockstreambuf.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/psocksxx/sockstreambuf.cpp b/lib/psocksxx/sockstreambuf.cpp index c0a0c81..af3f308 100644 --- a/lib/psocksxx/sockstreambuf.cpp +++ b/lib/psocksxx/sockstreambuf.cpp @@ -68,7 +68,7 @@ namespace psocksxx { cleanup_buffers(); // cleanup timeout - if ( _timeout != 0 ) { + if ( _timeout ) { delete _timeout; } @@ -78,7 +78,7 @@ namespace psocksxx { void sockstreambuf::init_defaults() throw() { // timeout structure reference - _timeout = 0; + _timeout = NULL; // timed-out status _timed_out = false; @@ -165,7 +165,7 @@ namespace psocksxx { } // setup timeout if needed - if ( timeout > 0 ) { + if ( timeout ) { // make the socket non-blocking if ( fcntl( _socket, F_SETFL, ( s_flags | O_NONBLOCK ) ) == -1 ) { @@ -180,7 +180,7 @@ namespace psocksxx { } // check for timeout if set - if ( timeout > 0 ) { + if ( timeout ) { if (! ready( timeout ) ) { @@ -264,13 +264,13 @@ namespace psocksxx { void * sockstreambuf::clear_timeout() throw() { // sanity check - if ( _timeout != 0 ) { + if ( _timeout ) { // delete structure delete _timeout; // set a null pointer - _timeout = 0; + _timeout = NULL; } @@ -481,7 +481,7 @@ namespace psocksxx { _timed_out = false; // create timespec structure from timeval structure - if ( timeout != 0 ) { + if ( timeout ) { t_spec = new timespec; t_spec->tv_sec = timeout->tv_sec; t_spec->tv_nsec = ( timeout->tv_usec * 1000 ); |