From f3fafb67596f5487b21caff2eb11efd5d27d39b1 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Thu, 15 May 2025 17:09:29 -0300 Subject: [PATCH] make clang happy --- mongoose.c | 2 +- src/net_builtin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 055cf85f..bc26146b 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4916,7 +4916,7 @@ static void read_conn(struct mg_connection *c, struct pkt *pkt) { // process options (MSS) static void handle_opt(struct connstate *s, struct tcp *tcp) { uint8_t *opts = (uint8_t *) (tcp + 1); - int len = 4 * ((int) (tcp->off >> 4) - (sizeof(*tcp) / 4)); + int len = 4 * ((int) (tcp->off >> 4) - ((int) sizeof(*tcp) / 4)); s->dmss = 536; // assume default, RFC-9293 3.7.1 while (len > 0) { // RFC-9293 3.1 3.2 uint8_t kind = opts[0], optlen = 1; diff --git a/src/net_builtin.c b/src/net_builtin.c index 1d9ebd92..2a096c1e 100644 --- a/src/net_builtin.c +++ b/src/net_builtin.c @@ -754,7 +754,7 @@ static void read_conn(struct mg_connection *c, struct pkt *pkt) { // process options (MSS) static void handle_opt(struct connstate *s, struct tcp *tcp) { uint8_t *opts = (uint8_t *) (tcp + 1); - int len = 4 * ((int) (tcp->off >> 4) - (sizeof(*tcp) / 4)); + int len = 4 * ((int) (tcp->off >> 4) - ((int) sizeof(*tcp) / 4)); s->dmss = 536; // assume default, RFC-9293 3.7.1 while (len > 0) { // RFC-9293 3.1 3.2 uint8_t kind = opts[0], optlen = 1;