krb5 commit: Remove unneeded conditional in hex.c

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/a9f9a68d21f8f06dd78b80208aee292d2266a85d
commit a9f9a68d21f8f06dd78b80208aee292d2266a85d
Author: Greg Hudson <[email protected]>
Date:   Mon Mar 19 12:23:19 2018 -0400

    Remove unneeded conditional in hex.c
    
    hex_digit() accepts bval as an unsigned parameter, so we don't need to
    test if bval >= 0.

 src/util/support/hex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util/support/hex.c b/src/util/support/hex.c
index 4407ff9..cbd30d7 100644
--- a/src/util/support/hex.c
+++ b/src/util/support/hex.c
@@ -37,7 +37,7 @@
 static inline char
 hex_digit(uint8_t bval, int uppercase)
 {
-    assert(bval >= 0 && bval <= 0xF);
+    assert(bval <= 0xF);
     if (bval < 10)
         return '0' + bval;
     else if (uppercase)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.