瀏覽代碼

Simplify hexchar

rexim 3 年之前
父節點
當前提交
280f577209
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test.c

+ 1 - 1
test.c

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