Never pass a signed char to ctype macros like isdigit()

Bug: None
Change-Id: I451bb2c1f175a77aefbc8363009bf35a769fe941
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264442
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37037}
This commit is contained in:
Niels Möller
2022-05-30 12:57:41 +02:00
committed by WebRTC LUCI CQ
parent c85e473740
commit e66b83f8ad
13 changed files with 11 additions and 16 deletions

View File

@ -286,7 +286,7 @@ int main(int argc, char* argv[]) {
/* Packet loss test */
if (!strcmp("-PL", argv[i])) {
if (isdigit(*argv[i + 1])) {
if (isdigit(static_cast<unsigned char>(*argv[i + 1]))) {
packetLossPercent = atoi(argv[i + 1]);
if ((packetLossPercent < 0) | (packetLossPercent > 100)) {
printf("\nInvalid packet loss perentage \n");

View File

@ -22,7 +22,6 @@
#endif
#endif
#include <ctype.h>
#include <math.h>
/* include API */