summaryrefslogtreecommitdiff
path: root/ch2/2-03.c
diff options
context:
space:
mode:
authorAdam Carpenter <gitlab@53hor.net>2019-07-23 13:03:59 -0400
committerAdam Carpenter <gitlab@53hor.net>2019-07-23 13:03:59 -0400
commitcbfba32803a16ebe6b33f8ccdedf602cc49addc7 (patch)
tree2787b016e1b4cb2c56c6fb57257126b2b3d594bd /ch2/2-03.c
parentfa996dc786d26afc508d637c565ec401f6b5ddb9 (diff)
downloadlearning-c-cbfba32803a16ebe6b33f8ccdedf602cc49addc7.tar.xz
learning-c-cbfba32803a16ebe6b33f8ccdedf602cc49addc7.zip
Removed unecessary string terminator checks.
Diffstat (limited to 'ch2/2-03.c')
-rw-r--r--ch2/2-03.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ch2/2-03.c b/ch2/2-03.c
index 54ce89f..0376484 100644
--- a/ch2/2-03.c
+++ b/ch2/2-03.c
@@ -8,7 +8,7 @@ unsigned int htoi(char hex[]) {
int power;
unsigned int result;
- for (length = 0; hex[length] != '\0'; ++length)
+ for (length = 0; hex[length]; ++length)
power = 1;
result = 0;