From 4c9895bcbaf0c43dc4e0d7fdd7fd70ba9c3ccfb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Mill=C3=A1n?= Date: Fri, 22 Dec 2023 12:04:35 +0100 Subject: [PATCH] remove uneeded '-1 *' to negate an int --- worker/src/DepLibUring.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/worker/src/DepLibUring.cpp b/worker/src/DepLibUring.cpp index f4a51a5617..bfd44aba4d 100644 --- a/worker/src/DepLibUring.cpp +++ b/worker/src/DepLibUring.cpp @@ -35,7 +35,7 @@ inline static void onFdEvent(uv_poll_t* handle, int status, int events) if (err < 0) { // Get positive errno. - int error = -1 * err; + int error = -err; MS_ABORT("eventfd_read() failed: %s", std::strerror(error)); }; @@ -282,7 +282,7 @@ DepLibUring::LibUring::LibUring() if (err < 0) { // Get positive errno. - int error = -1 * err; + int error = -err; MS_THROW_ERROR("io_uring_queue_init() failed: %s", std::strerror(error)); } @@ -300,7 +300,7 @@ DepLibUring::LibUring::LibUring() if (err < 0) { // Get positive errno. - int error = -1 * err; + int error = -err; MS_THROW_ERROR("io_uring_register_eventfd() failed: %s", std::strerror(error)); } @@ -324,7 +324,7 @@ DepLibUring::LibUring::LibUring() if (err < 0) { // Get positive errno. - int error = -1 * err; + int error = -err; if (error == ENOMEM) { @@ -352,7 +352,7 @@ DepLibUring::LibUring::~LibUring() if (err != 0) { // Get positive errno. - int error = -1 * err; + int error = -err; MS_ABORT("close() failed: %s", std::strerror(error)); } @@ -575,7 +575,7 @@ void DepLibUring::LibUring::Submit() else { // Get positive errno. - int error = -1 * err; + int error = -err; MS_ERROR("io_uring_submit() failed: %s", std::strerror(error)); }