From f8d9ff23eb8d3e3286ff5cf4d5f9493532991bb7 Mon Sep 17 00:00:00 2001 From: zlg Date: Thu, 16 Jun 2016 10:15:33 -0700 Subject: The massive astyle sweep! Code style should be consistent now. All future commits will be run through astyle or they will be amended. --- ch2/2-03_hex-to-int.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ch2/2-03_hex-to-int.c') diff --git a/ch2/2-03_hex-to-int.c b/ch2/2-03_hex-to-int.c index 566bd75..4985bc5 100644 --- a/ch2/2-03_hex-to-int.c +++ b/ch2/2-03_hex-to-int.c @@ -25,16 +25,15 @@ int htoi(char s[]) { int i, val; - for (i = val = 0; isxdigit(s[i]) || toupper(s[i]) == 'X'; ++i) { if (toupper(s[i]) == 'X') { continue; } if (s[i] > '9') { val = 16 * val + (toupper(s[i]) - '7'); - // The 7 is because 'A' is 7 higher than '9' in ASCII and thus only needs - // to be knocked down by that much to fall in line with the normal integer - // conversion + /* The 7 is because 'A' is 7 higher than '9' in ASCII and thus only needs */ + /* to be knocked down by that much to fall in line with the normal integer */ + /* conversion */ } else { val = 16 * val + (s[i] - '0'); } -- cgit v1.2.3-54-g00ecf