diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-09 12:17:25 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-12-09 12:17:25 -0500 |
commit | d834a9dcecae834cd6b2bc5e50e1907738d9cf6a (patch) | |
tree | 0589d753465d3fe359ba451ba6cb7798df03aaa2 /net/core/utils.c | |
parent | a38c5380ef9f088be9f49b6e4c5d80af8b1b5cd4 (diff) | |
parent | f658bcfb2607bf0808966a69cf74135ce98e5c2d (diff) |
Merge branch 'x86/amd-nb' into x86/apic-cleanups
Reason: apic cleanup series depends on x86/apic, x86/amd-nb x86/platform
Conflicts:
arch/x86/include/asm/io_apic.h
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net/core/utils.c')
-rw-r--r-- | net/core/utils.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/core/utils.c b/net/core/utils.c index f41854470539..5fea0ab21902 100644 --- a/net/core/utils.c +++ b/net/core/utils.c | |||
@@ -75,7 +75,7 @@ __be32 in_aton(const char *str) | |||
75 | str++; | 75 | str++; |
76 | } | 76 | } |
77 | } | 77 | } |
78 | return(htonl(l)); | 78 | return htonl(l); |
79 | } | 79 | } |
80 | EXPORT_SYMBOL(in_aton); | 80 | EXPORT_SYMBOL(in_aton); |
81 | 81 | ||
@@ -92,18 +92,19 @@ EXPORT_SYMBOL(in_aton); | |||
92 | 92 | ||
93 | static inline int xdigit2bin(char c, int delim) | 93 | static inline int xdigit2bin(char c, int delim) |
94 | { | 94 | { |
95 | int val; | ||
96 | |||
95 | if (c == delim || c == '\0') | 97 | if (c == delim || c == '\0') |
96 | return IN6PTON_DELIM; | 98 | return IN6PTON_DELIM; |
97 | if (c == ':') | 99 | if (c == ':') |
98 | return IN6PTON_COLON_MASK; | 100 | return IN6PTON_COLON_MASK; |
99 | if (c == '.') | 101 | if (c == '.') |
100 | return IN6PTON_DOT; | 102 | return IN6PTON_DOT; |
101 | if (c >= '0' && c <= '9') | 103 | |
102 | return (IN6PTON_XDIGIT | IN6PTON_DIGIT| (c - '0')); | 104 | val = hex_to_bin(c); |
103 | if (c >= 'a' && c <= 'f') | 105 | if (val >= 0) |
104 | return (IN6PTON_XDIGIT | (c - 'a' + 10)); | 106 | return val | IN6PTON_XDIGIT | (val < 10 ? IN6PTON_DIGIT : 0); |
105 | if (c >= 'A' && c <= 'F') | 107 | |
106 | return (IN6PTON_XDIGIT | (c - 'A' + 10)); | ||
107 | if (delim == -1) | 108 | if (delim == -1) |
108 | return IN6PTON_DELIM; | 109 | return IN6PTON_DELIM; |
109 | return IN6PTON_UNKNOWN; | 110 | return IN6PTON_UNKNOWN; |