Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Unified Diff: net/ftp/ftp_network_transaction.cc

Issue 2558643002: Remove some uses of isdigit in net/, as it can be locale depedent. (Closed)
Patch Set: Response Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_spdy_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction.cc
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index 018a892904ea54274ebd32d499da3c13bc916eaf..dbe1154f8262fc7260833bb7abdcf43aba9e8137 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -135,8 +135,8 @@ bool ExtractPortFromEPSVResponse(const FtpCtrlResponse& response, int* port) {
char separator = epsv_line[start + 1];
// Make sure we have "(<d><d><d>...", where <d> is not a number.
- if (isdigit(separator) || epsv_line[start + 2] != separator ||
- epsv_line[start + 3] != separator) {
+ if ((separator >= '0' && separator <= '9') ||
+ epsv_line[start + 2] != separator || epsv_line[start + 3] != separator) {
return false;
}
« no previous file with comments | « no previous file | net/quic/core/quic_spdy_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698