]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Text protocols: Use u_int as return type for fetch_token()
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 2 Jan 2024 10:35:35 +0000 (11:35 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Fri, 28 Mar 2025 09:10:03 +0000 (10:10 +0100)
It was 'int' but
1) fetch_token() return 0 or idx which is an 'u_int'.
2) fetch_token() is called with:
   idx = fetch_token(...);
   with idx an 'u_int'.

(cherry picked from commit a6b1a1a514c89a6a8cbf8e9cdcfd7e86c3de108e)

util-print.c

index f055725c92080f77907d4cb18f0c487d846eaa59..a8eb07cc4f709dca9d7405449618638ec14031b4 100644 (file)
@@ -718,7 +718,7 @@ mask62plen(const u_char *mask)
  * either a space character at the beginning of the line (this
  * includes a blank line) or no more tokens remaining on the line.
  */
-static int
+static u_int
 fetch_token(netdissect_options *ndo, const u_char *pptr, u_int idx, u_int len,
     u_char *tbuf, size_t tbuflen)
 {