From: Jérémie Galarneau Date: Wed, 29 Mar 2023 17:41:26 +0000 (-0400) Subject: Fix: file-descriptor: unnecessary assert in move constructor X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e9a2bd79cfeb5ec3f246fb0bba0e32823bb1a272;p=lttng-tools.git Fix: file-descriptor: unnecessary assert in move constructor There is no use in checking the current fd in the move constructor. This is probably a left-over from the inital move assignment operator. Signed-off-by: Jérémie Galarneau Change-Id: I416d2778784ddea448904118c940914c030bf399 --- diff --git a/src/common/file-descriptor.hpp b/src/common/file-descriptor.hpp index 51f397bcf..8d6b64be4 100644 --- a/src/common/file-descriptor.hpp +++ b/src/common/file-descriptor.hpp @@ -29,8 +29,8 @@ public: file_descriptor& operator=(const file_descriptor&) = delete; file_descriptor& operator=(file_descriptor&&) = delete; - file_descriptor(file_descriptor&& other) noexcept { - LTTNG_ASSERT(_is_valid_fd(_raw_fd)); + file_descriptor(file_descriptor&& other) noexcept + { std::swap(_raw_fd, other._raw_fd); }