Browse Source

Simplify hexchar

rexim 3 years ago
parent
commit
280f577209
1 changed files with 1 additions and 1 deletions
  1. 1 1
      test.c

+ 1 - 1
test.c

@@ -39,7 +39,7 @@
 char hexchar(uint8_t x)
 char hexchar(uint8_t x)
 {
 {
     if (x < 10) return x + '0';
     if (x < 10) return x + '0';
-    if (10 <= x && x < 16) return x - 10 + 'A';
+    if (x < 16) return x - 10 + 'A';
     UNREACHABLE("hexchar");
     UNREACHABLE("hexchar");
 }
 }