Skip to content

Use array_length instead of "sizeof arr / sizeof (TYPE)".

dariusd0 requested to merge dariusd0/wireshark:janitorial into master

One increment in the process of converting manual array-length computations to the array_length macro. This change converts about 200 instances in a small number of files. Another (approx.) 170 instances remain, scattered throughout a larger number of separate files.

Comparison of the built object files before and after this commit confirms that the only net effect of this change is in the .debug_line section, so this commit will not actually change any program behavior. This also helps assure that all the removed "(TYPE)" expressions did indeed correctly reflect the array type.

Merge request reports