]> The Tcpdump Group git mirrors - libpcap/commitdiff
Nine is a digit. 847/head
authorBill Fenner <[email protected]>
Tue, 24 Sep 2019 14:48:00 +0000 (07:48 -0700)
committerBill Fenner <[email protected]>
Tue, 24 Sep 2019 14:53:41 +0000 (07:53 -0700)
Fixes fencepost errors in git commit 5a41835

etherent.c
nametoaddr.c

index 3504a25ef1f53e35a621b65976d873cf311f5da9..69da9a540ad8d088b304b8432fc55c3d86b9012e 100644 (file)
@@ -44,7 +44,7 @@ static inline int skip_line(FILE *);
 static inline u_char
 xdtoi(u_char c)
 {
-       if (c >= '0' && c < '9')
+       if (c >= '0' && c <= '9')
                return (u_char)(c - '0');
        else if (c >= 'a' && c <= 'f')
                return (u_char)(c - 'a' + 10);
index 4d632819e4d839ea6b7d58ad2a642293e90c5f46..ac6deeaf417e5843ef8331b413c9cc58a11a639f 100644 (file)
@@ -652,7 +652,7 @@ pcap_nametollc(const char *s)
 static inline u_char
 xdtoi(u_char c)
 {
-       if (c >= '0' && c < '9')
+       if (c >= '0' && c <= '9')
                return (u_char)(c - '0');
        else if (c >= 'a' && c <= 'f')
                return (u_char)(c - 'a' + 10);