Ban [w]ctype.h: crashpad

Bug: chromium:1361094
Change-Id: Ia5dacb9038cd74b5d490282a8070fb4579ebe3ae
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4750179
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
This commit is contained in:
Peter Kasting 2023-08-03 13:20:50 -07:00 committed by Crashpad LUCI CQ
parent 8132af7ccb
commit 419f995aab
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,6 @@
#include "util/misc/lexing.h"
#include <ctype.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
@ -23,6 +22,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
namespace crashpad {
@ -55,7 +55,7 @@ bool AdvancePastNumber(const char** input, T* value) {
if (std::numeric_limits<T>::is_signed && **input == '-') {
++length;
}
while (isdigit((*input)[length])) {
while (base::IsAsciiDigit((*input)[length])) {
++length;
}
bool success =

View File

@ -14,7 +14,6 @@
#include "util/stdlib/string_number_conversion.h"
#include <ctype.h>
#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
@ -22,6 +21,7 @@
#include <limits>
#include "base/strings/string_util.h"
namespace {
@ -141,7 +141,7 @@ bool StringToIntegerInternal(const std::string& string,
Traits::TypeCheck();
if (string.empty() || isspace(string[0])) {
if (string.empty() || base::IsAsciiWhitespace(string[0])) {
return false;
}