]> The Tcpdump Group git mirrors - tcpdump/commit
instrument functions: Use two loop indexes with reduced scopes
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 18 Oct 2023 17:37:36 +0000 (19:37 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 19 Oct 2023 09:30:04 +0000 (11:30 +0200)
commit40f420cf065b003fc074f6141dfc836addd5187d
tree461a74b50722e3644da02358915b44eb310cfbc7
parent7e285a3f675a08ee8895c629a02e2de920b56e83
instrument functions: Use two loop indexes with reduced scopes

The first is a long, comparison with the long 'symcount'.
The second is a int, comparison with the int 'profile_func_level'.

Moreover:
Add a cast to silence the following warning:
./instrument-functions.c:143:31: warning: implicit conversion changes
signedness: 'long' to 'unsigned long' [-Wsign-conversion]
        symtab = (asymbol **)malloc(symsize);
                             ~~~~~~ ^~~~~~~
(symsize is a long as return type of bfd_get_symtab_upper_bound().)
instrument-functions.c