krb5 commit [krb5-1.10]: Fix condition with empty body

Tom Yu tlyu at MIT.EDU
Tue Apr 16 17:31:37 EDT 2013


https://github.com/krb5/krb5/commit/63b5902e83eb7d47f2eb061acde2566ec1d45bc8
commit 63b5902e83eb7d47f2eb061acde2566ec1d45bc8
Author: David Benjamin <davidben at mit.edu>
Date:   Wed Mar 13 01:08:01 2013 -0400

    Fix condition with empty body
    
    Found by clang's warnings.
    
    (cherry picked from commit 18796a2eb6c05706c6635453b3e425955aab93f4)
    
    ticket: 7606 (new)
    version_fixed: 1.10.5
    status: resolved

 src/lib/kdb/keytab.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/kdb/keytab.c b/src/lib/kdb/keytab.c
index 00b45f8..b85b67d 100644
--- a/src/lib/kdb/keytab.c
+++ b/src/lib/kdb/keytab.c
@@ -41,8 +41,8 @@ static krb5_error_code
 krb5_ktkdb_get_name(krb5_context context, krb5_keytab keytab,
                     char *name, unsigned int namelen)
 {
-    if (strlcpy(name, "KDB:", namelen) >= namelen);
-    return KRB5_KT_NAME_TOOLONG;
+    if (strlcpy(name, "KDB:", namelen) >= namelen)
+        return KRB5_KT_NAME_TOOLONG;
     return 0;
 }
 


More information about the cvs-krb5 mailing list