From f8d95542492a8a960853c0cb0b855d2473c941a0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Nov 2020 01:43:03 +0100 Subject: Simplify boolean return expression --- include/raul/Socket.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include/raul/Socket.hpp') diff --git a/include/raul/Socket.hpp b/include/raul/Socket.hpp index 579a5cd..ed5204f 100644 --- a/include/raul/Socket.hpp +++ b/include/raul/Socket.hpp @@ -205,11 +205,7 @@ Socket::connect(const std::string& uri) inline bool Socket::listen() { - if (::listen(_sock, 64) == -1) { - return false; - } else { - return true; - } + return ::listen(_sock, 64) != -1; } inline std::shared_ptr -- cgit v1.2.1