diff --git a/include/boost/asio/detail/impl/socket_ops.ipp b/include/boost/asio/detail/impl/socket_ops.ipp index 8b62826a94..ba4c8c4372 100644 --- a/include/boost/asio/detail/impl/socket_ops.ipp +++ b/include/boost/asio/detail/impl/socket_ops.ipp @@ -642,7 +642,7 @@ bool sockatmark(socket_type s, boost::system::error_code& ec) # endif // defined(ENOTTY) #else // defined(SIOCATMARK) int value = ::sockatmark(s); - get_last_error(ec, result < 0); + get_last_error(ec, value < 0); #endif // defined(SIOCATMARK) return ec ? false : value != 0;