Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perftests/{recv,send}-zeros: fix sanity checks
I added sanity checks in: 2022-08-23 perfests/{recv,send}-zeros: add sanity checks c87a40b which were a bit confused (i.e. checking that a (size_t) was not <= 0). At that time: - buflen in recv-zeros/main.c was a (ssize_t), whereas - buflen in send-zeros/main.c was a (size_t), and - clang-tidy 14 and lower could not follow our PARSENUM(). macro to understand that: if (PARSENUM(&buflen, argv[2], 1, SSIZE_MAX)) goto err0; would always result in a positive, non-zero value in buflen. This commit: - makes both files use (size_t)buflen. - adds bounds to PARSENUM(&count... - eliminates the post-PARSENUM sanity checks. That last point will make clang-tidy versions below 15.0.0 (2022-09-6) complain about the code, but inspection shows that it's correct. And it's normal for clang-tidy to have tons of complaints anyway; I normally disable ~60 types of warnings. - also, this commit cleans up the #includes.
- Loading branch information