diff options
author | Ben Kaduk <kaduk@mit.edu> | 2013-10-30 14:51:12 -0400 |
---|---|---|
committer | Ben Kaduk <kaduk@mit.edu> | 2013-11-04 13:51:17 -0500 |
commit | 3a8eaa43045fb242739ad9729bb66f915be209b9 (patch) | |
tree | 6a0a8a0ab74adda71b764724a0d8f3466c9dbcee /src/kdc | |
parent | 4547a1078afdeeb781307cf4a125baccf2edab02 (diff) | |
download | krb5-3a8eaa43045fb242739ad9729bb66f915be209b9.zip krb5-3a8eaa43045fb242739ad9729bb66f915be209b9.tar.gz krb5-3a8eaa43045fb242739ad9729bb66f915be209b9.tar.bz2 |
Clean up the code to eliminate some clang warnings
In ure.c, though k is a short, the literal 1 is of type 'int', and
so the operation 'k + 1' is performed at the (32-bit) width of int,
and therefore the "%d" format string is correct.
In accept_sec_context.c, the 'length' field of krb5_data is an
unsigned type, so checking for a negative value has no effect.
In net-server.c, the helper routine rtm_type_name() is only used
in code that is disabled with #if 0 conditionals; make the
definition also disabled in the same way to avoid warnings of an
unused function.
In kdc_authdata.c, equality checks in double parentheses elicit
a warning from clang. The double-parentheses idiom is normally used
to indicate that an assignment is being performed, but the value of
the assignment is also to be used as the value for the conditional.
Since assignment and equality checking differ only by a single
character, clang considers this worthy of a warning. Since the extra
set of parentheses is redundant and against style, it is correct to
remove them.
In several places (sim_server.c, dump.c, kdb5_destroy.c,
ovsec_kadmd.c), there are declarations of extern variables relating
to getopt() functionality that are now unused in the code. Remove
these unused variables.
Diffstat (limited to 'src/kdc')
-rw-r--r-- | src/kdc/kdc_authdata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kdc/kdc_authdata.c b/src/kdc/kdc_authdata.c index 731c7d5..e70a27b 100644 --- a/src/kdc/kdc_authdata.c +++ b/src/kdc/kdc_authdata.c @@ -280,7 +280,7 @@ load_authdata_plugins(krb5_context context) void *pctx = NULL; ftable = authdata_plugins_ftables_v2[i]; - if ((ftable->authdata_proc == NULL)) { + if (ftable->authdata_proc == NULL) { continue; } server_init_proc = ftable->init_proc; @@ -316,7 +316,7 @@ load_authdata_plugins(krb5_context context) void *pctx = NULL; ftable = authdata_plugins_ftables_v0[i]; - if ((ftable->authdata_proc == NULL)) { + if (ftable->authdata_proc == NULL) { continue; } server_init_proc = ftable->init_proc; |