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

Side by Side Diff: net/base/dns_util.cc

Issue 197055: Include fixes for gcc >= 4.3 (Closed)
Patch Set: Created 11 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/menu_bar_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/dns_util.h" 5 #include "net/base/dns_util.h"
6 6
7 #include <cstring>
8
7 namespace net { 9 namespace net {
8 10
9 // Based on DJB's public domain code. 11 // Based on DJB's public domain code.
10 bool DNSDomainFromDot(const std::string& dotted, std::string* out) { 12 bool DNSDomainFromDot(const std::string& dotted, std::string* out) {
11 const char* buf = dotted.data(); 13 const char* buf = dotted.data();
12 unsigned n = dotted.size(); 14 unsigned n = dotted.size();
13 char label[63]; 15 char label[63];
14 unsigned int labellen = 0; /* <= sizeof label */ 16 unsigned int labellen = 0; /* <= sizeof label */
15 char name[255]; 17 char name[255];
16 unsigned int namelen = 0; /* <= sizeof name */ 18 unsigned int namelen = 0; /* <= sizeof name */
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 if (c >= 0x2e && c <= 0x2f) 64 if (c >= 0x2e && c <= 0x2f)
63 return false; 65 return false;
64 if (c >= 0x3a && c <= 0x40) 66 if (c >= 0x3a && c <= 0x40)
65 return false; 67 return false;
66 if (c >= 0x5b && c <= 0x60) 68 if (c >= 0x5b && c <= 0x60)
67 return false; 69 return false;
68 return true; 70 return true;
69 } 71 }
70 72
71 } // namespace net 73 } // namespace net
OLDNEW
« no previous file with comments | « chrome/browser/gtk/menu_bar_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698