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 [125.160.108.65]) by gnuweeb.org (Postfix) with ESMTPSA id 6BB1E7F9AB; Sun, 26 Jun 2022 05:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1656223011; bh=AWXhIMfN4MLcbgNa1vNB0l5G/AzU7X7zid0z5rtR/uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHOLPXMK3v9WatY7CtQ07RaGweztusXZcjNg4y1ejcc5PaPzLZNOyh1Eq3JWw8uFH bQs32aJKf+WAS6JuGCOcT+nksXZfn/wt5Uuqb6/lZ5xlAbeZw+KjwKvoz6R9szkI7f 5qSV4ZLLJXAyytDHcJbvsxt9AiDWgBXKyh/uQF3a014esqdwbfYwFSUsyzao8JdP2z UYDB0Rkiyxw8mOgaMDFNemZ5UjKWHEI0uXqOAssIrt2cMNRS3I8glr+1M5YQuO6uEv adx/pkbKhofXa9fYRXvwquYkWrMPGW2SJPprBuU7laPMDiEAcJC9ZhhwBR1uRaY92L kLjIDm9NMIcbg== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Arthur Lapz , Sprite , Yonle Subject: [PATCH gwhttpd 2/7] gwhttpd: Don't print any error when mlock fails Date: Sun, 26 Jun 2022 12:56:29 +0700 Message-Id: <20220626055634.676175-3-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220626055634.676175-1-ammarfaizi2@gnuweeb.org> References: <20220626055634.676175-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