From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from integral2.. (unknown [36.81.65.188]) by gnuweeb.org (Postfix) with ESMTPSA id 893807E330; Fri, 8 Jul 2022 12:10:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1657282242; bh=AWXhIMfN4MLcbgNa1vNB0l5G/AzU7X7zid0z5rtR/uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pLh1lr1hi/jN8NBbhwJhAWEzHeNfmkfohYZMU8m7lO5LLL3PLji7mVWluwzZ0lydJ Od9v1bWa5UUGs6o04MHUtq91DaIhwyie3hTTQoZe5lHR/hM/MkYMEbSY3QsbuTe92x ptg3jEr66MyHJ7zd2rxGoH017MgpI47k8Vu6yrRsdiKsm+j+Z2csQ1X2dnXdJisMLF NzCB4MtVzBYaesIUJwwf4zs168aM+CLZ9YStLAgaeUKMEUnZzbWriaTiLE2ScLH34N I0lE4Iazxl4iovKJuOOD1yvXoMJhovhapVd20z+CkKdu/OvazMluzfh/dVbFzR5GF6 gsIVF+7PwznzQ== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Alviro Iskandar Setiawan , Arthur Lapz , Fernanda Ma'rouf , Sprite , Yonle Subject: [PATCH gwhttpd 02/14] gwhttpd: Don't print any error when mlock fails Date: Fri, 8 Jul 2022 19:10:13 +0700 Message-Id: <20220708121025.926162-3-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708121025.926162-1-ammarfaizi2@gnuweeb.org> References: <20220708121025.926162-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This mlock is just optional, don't bother showing error. Signed-off-by: Ammar Faizi --- gwhttpd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gwhttpd.cpp b/gwhttpd.cpp index 33b58a1..b01d5f1 100644 --- a/gwhttpd.cpp +++ b/gwhttpd.cpp @@ -647,9 +647,7 @@ int main(int argc, char *argv[]) return ret; } - ret = mlock(state, sizeof(*state)); - if (ret < 0) - perror("mlock"); + mlock(state, sizeof(*state)); #endif g_state = state; -- Ammar Faizi