From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server-vie001.gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_DBL_BLOCKED_OPENDNS, URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=new2025; t=1756454900; bh=wogvBjIg8pGxauCK0oddllK3XsNZZMXq24QB5r7HJHM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:Message-ID:Date:From:Reply-To:Subject:To: Cc:In-Reply-To:References:Resent-Date:Resent-From:Resent-To: Resent-Cc:User-Agent:Content-Type:Content-Transfer-Encoding; b=YSkxQrhcMgCW/46Y3vqx8Fv0PvertTv3Jd4f92U694FS1RbgFmRn6PFZLdQQwMZGa L7c/SwefDWqyV3dzUGHRqMPjxFIWjAfK/FBVeubcm4nUEQIPBw61Q7hcB4Yx04S7w/ 8wi3n7B8I352tEcvt8z3zY3yhF0lZTUe0MealFZeL2cq0mwRcQtBcXS3l/7FrlNslH HdqtWHOtcWno+b9JZEkm1EIZUaf9SNA4Jrho3rNhpUQVWgCG429pJrbThF95kALGnd AT47Zy66yQXuStuOwTL2Qp9Y/EGP2jUOFzjRLaE6GlrYefGYhoskMHLZ6AvATs/rCf Dpb/EZNAHOmng== Received: from zero (unknown [182.253.228.107]) by server-vie001.gnuweeb.org (Postfix) with ESMTPSA id B10A63127F94; Fri, 29 Aug 2025 08:08:17 +0000 (UTC) From: Ahmad Gani To: Ammar Faizi Cc: Ahmad Gani , Alviro Iskandar Setiawan , GNU/Weeb Mailing List Subject: [PATCH gwproxy v1] gwproxy: Remove trailing spaces Date: Fri, 29 Aug 2025 15:07:58 +0700 Message-ID: <20250829080811.599931-1-reyuki@gnuweeb.org> X-Mailer: git-send-email 2.50.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Signed-off-by: Ahmad Gani --- src/gwproxy/dns_cache.c | 2 +- src/gwproxy/dns_cache.h | 14 +++++++------- src/gwproxy/gwproxy.c | 2 +- src/gwproxy/socks5.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gwproxy/dns_cache.c b/src/gwproxy/dns_cache.c index 1d52b452094a..0ea70e69be66 100644 --- a/src/gwproxy/dns_cache.c +++ b/src/gwproxy/dns_cache.c @@ -395,7 +395,7 @@ int gwp_dns_cache_insert(struct gwp_dns_cache *cache, const char *key, return r; } -int gwp_dns_cache_getent(struct gwp_dns_cache *cache, const char *key, +int gwp_dns_cache_getent(struct gwp_dns_cache *cache, const char *key, struct gwp_dns_cache_entry **ep) { struct dns_cache_entry *de = NULL; diff --git a/src/gwproxy/dns_cache.h b/src/gwproxy/dns_cache.h index 7edbde34875a..3e691af2001b 100644 --- a/src/gwproxy/dns_cache.h +++ b/src/gwproxy/dns_cache.h @@ -49,7 +49,7 @@ struct gwp_dns_cache; * Initialize a DNS cache and fills the provided pointer with a new cache * instance. When the cache is no longer needed, it should be freed using * `gwp_dns_cache_free()`. - * + * * @param cache_p Pointer to the cache pointer that will be initialized. * @param nr_buckets Number of buckets for the hash map. * @return int 0 on success, negative error code on failure. @@ -58,7 +58,7 @@ int gwp_dns_cache_init(struct gwp_dns_cache **cache_p, uint32_t nr_buckets); /** * Free the DNS cache and all its resources. - * + * * @param cache The DNS cache to free. */ void gwp_dns_cache_free(struct gwp_dns_cache *cache); @@ -76,26 +76,26 @@ void gwp_dns_cache_housekeep(struct gwp_dns_cache *cache); * entry if it exists. It increments the reference count of the * entry, so it can be safely used even after the cache is freed * using `gwp_dns_cache_free()`. - * + * * `gwp_dns_cache_putent()` MUST be called to release the reference * count when the entry is no longer needed. - * + * * @param cache The DNS cache to look up the entry in. * @param key The key to look up, typically a domain name. * @param ep Pointer to a pointer that will be filled with the found entry. * @return int 0 on success, negative error code on failure. - * + * * Error codes: * -ENOENT: Entry not found. */ -int gwp_dns_cache_getent(struct gwp_dns_cache *cache, const char *key, +int gwp_dns_cache_getent(struct gwp_dns_cache *cache, const char *key, struct gwp_dns_cache_entry **ep); /** * Decrement the reference count of a DNS cache entry. If the * reference count reaches zero, the entry is freed. This function * should be called when the entry is no longer needed. - * + * * @param e The DNS cache entry to put. */ void gwp_dns_cache_putent(struct gwp_dns_cache_entry *e); diff --git a/src/gwproxy/gwproxy.c b/src/gwproxy/gwproxy.c index 7a90609dd5f1..3d277f7ee6f8 100644 --- a/src/gwproxy/gwproxy.c +++ b/src/gwproxy/gwproxy.c @@ -349,7 +349,7 @@ static int gwp_ctx_init_thread_sock(struct gwp_wrk *w, const struct gwp_sockaddr *ba) { struct gwp_ctx *ctx = w->ctx; - int type = SOCK_STREAM | SOCK_CLOEXEC | + int type = SOCK_STREAM | SOCK_CLOEXEC | (ctx->ev_used == GWP_EV_EPOLL ? SOCK_NONBLOCK : 0); struct gwp_cfg *cfg = &w->ctx->cfg; socklen_t slen; diff --git a/src/gwproxy/socks5.h b/src/gwproxy/socks5.h index 079e0e2433c4..10201329b3ec 100644 --- a/src/gwproxy/socks5.h +++ b/src/gwproxy/socks5.h @@ -91,7 +91,7 @@ int gwp_socks5_ctx_init(struct gwp_socks5_ctx **ctx_p, /** * Free the resources associated with a SOCKS5 context. - * + * * @param ctx The SOCKS5 context to free. If NULL, this function does * nothing. */ @@ -141,7 +141,7 @@ void gwp_socks5_conn_free(struct gwp_socks5_conn *conn); * written to `out_buf` or the required size if there * is not enough space. * @return 0 on success, or a negative error code on failure. - * + * * Error values: * * -ENOMEM: Not enough memory to handle the request. -- Ahmad Gani