]> 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]>
Tue, 2 Jan 2024 11:36:29 +0000 (12:36 +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'.

util-print.c

index e57fe19edf321889f10804d1efd641683272e460..b82576749cf623142074a1cf2e28b1bb2d91bb8c 100644 (file)
@@ -696,7 +696,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)
 {