public inbox for [email protected]
 help / color / mirror / Atom feed
From: Ammar Faizi <[email protected]>
To: GNU/Weeb Mailing List <[email protected]>
Cc: Ammar Faizi <[email protected]>,
	Arthur Lapz <[email protected]>, Sprite <[email protected]>,
	Yonle <[email protected]>
Subject: [PATCH gwhttpd 2/7] gwhttpd: Don't print any error when mlock fails
Date: Sun, 26 Jun 2022 12:56:29 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

This mlock is just optional, don't bother showing error.

Signed-off-by: Ammar Faizi <[email protected]>
---
 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


  parent reply	other threads:[~2022-06-26  5:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-26  5:56 [PATCH gwhttpd 0/7] gwhttpd updates Ammar Faizi
2022-06-26  5:56 ` [PATCH gwhttpd 1/7] gwhttpd: Do an early return when parse_http_header fails Ammar Faizi
2022-06-26  5:56 ` Ammar Faizi [this message]
2022-06-26  5:56 ` [PATCH gwhttpd 3/7] gwhttpd: Replace `send_error_and_close` with `send_http_error()` Ammar Faizi
2022-06-26  5:56 ` [PATCH gwhttpd 4/7] gwhttpd: Add log in the interrupt handler Ammar Faizi
2022-06-26  5:56 ` [PATCH gwhttpd 5/7] gwhttpd: Refactor HTTP header parser Ammar Faizi
2022-06-26  5:56 ` [PATCH gwhttpd 6/7] gwhttpd: Avoid endless busy spinning on `send()` Ammar Faizi
2022-06-26  5:56 ` [PATCH gwhttpd 7/7] Makefile: Add "make clean" command Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox