From: Arne Schwabe Date: Fri, 22 Apr 2022 13:40:38 +0000 (+0200) Subject: Remove inc_pid argument from reliable_mark_deleted that is always true X-Git-Tag: v2.6_beta1~235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=911224dbac0f11bb22e007db0ae424e864489ef8;p=thirdparty%2Fopenvpn.git Remove inc_pid argument from reliable_mark_deleted that is always true This is a small cleanup to remove a superfluous argument Acked-by: Gert Doering Message-Id: <20220422134038.3801239-10-arne@rfc2549.org> URL: https://www.mail-archive.com/search?l=mid&q=20220422134038.3801239-10-arne@rfc2549.org Signed-off-by: Gert Doering --- diff --git a/src/openvpn/reliable.c b/src/openvpn/reliable.c index 10a798a59..b9f01365a 100644 --- a/src/openvpn/reliable.c +++ b/src/openvpn/reliable.c @@ -730,7 +730,7 @@ reliable_mark_active_outgoing(struct reliable *rel, struct buffer *buf, int opco /* delete a buffer previously activated by reliable_mark_active() */ void -reliable_mark_deleted(struct reliable *rel, struct buffer *buf, bool inc_pid) +reliable_mark_deleted(struct reliable *rel, struct buffer *buf) { int i; for (i = 0; i < rel->size; ++i) @@ -739,10 +739,7 @@ reliable_mark_deleted(struct reliable *rel, struct buffer *buf, bool inc_pid) if (buf == &e->buf) { e->active = false; - if (inc_pid) - { - rel->packet_id = e->packet_id + 1; - } + rel->packet_id = e->packet_id + 1; return; } } diff --git a/src/openvpn/reliable.h b/src/openvpn/reliable.h index cd80bbfb2..1223b1da2 100644 --- a/src/openvpn/reliable.h +++ b/src/openvpn/reliable.h @@ -345,7 +345,7 @@ struct buffer *reliable_get_buf_sequenced(struct reliable *rel); * @param inc_pid If true, the reliable structure's packet ID counter * will be incremented. */ -void reliable_mark_deleted(struct reliable *rel, struct buffer *buf, bool inc_pid); +void reliable_mark_deleted(struct reliable *rel, struct buffer *buf); /** @} name Functions for extracting incoming packets */ diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index f2613228a..911d97f8e 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -2874,7 +2874,7 @@ tls_process(struct tls_multi *multi, } if (status == 1) { - reliable_mark_deleted(ks->rec_reliable, buf, true); + reliable_mark_deleted(ks->rec_reliable, buf); state_change = true; dmsg(D_TLS_DEBUG, "Incoming Ciphertext -> TLS"); }