diff options
author | Martin Nagy <mnagy@redhat.com> | 2008-06-26 12:52:25 +0200 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2008-06-30 14:17:10 -0400 |
commit | 6cce2f45e8b48422b2c3534b7a73c10ba95ad2fe (patch) | |
tree | dfb668e4020adb3dfcbf0701dfb07182cd1191ca /ipa-client | |
parent | f5d9dd647f242841bf9474a3a669b11562fe02f9 (diff) | |
download | freeipa-6cce2f45e8b48422b2c3534b7a73c10ba95ad2fe.tar.gz freeipa-6cce2f45e8b48422b2c3534b7a73c10ba95ad2fe.tar.xz freeipa-6cce2f45e8b48422b2c3534b7a73c10ba95ad2fe.zip |
Fix some small issues that caused compiler warnings, like uninitialized or unused variables or missing krb5 prototypes.
Diffstat (limited to 'ipa-client')
-rw-r--r-- | ipa-client/ipa-getkeytab.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ipa-client/ipa-getkeytab.c b/ipa-client/ipa-getkeytab.c index c68ed4ebb..f94695131 100644 --- a/ipa-client/ipa-getkeytab.c +++ b/ipa-client/ipa-getkeytab.c @@ -30,6 +30,7 @@ #include <string.h> #include <errno.h> #include <time.h> +#define KRB5_PRIVATE 1 #include <krb5.h> #ifdef WITH_MOZLDAP #include <mozldap/ldap.h> @@ -95,7 +96,7 @@ static int get_enctypes(krb5_context krbctx, const char *str, /* count */ n = 0; p = t; - while (p = strchr(t, ',')) { + while ((p = strchr(t, ','))) { t = p+1; n++; } @@ -239,7 +240,7 @@ static struct berval *create_key_control(krb5_keyblock *keys, int num_keys, cons int filter_keys(krb5_context krbctx, krb5_keyblock *keys, int *num_keys, ber_int_t *enctypes) { - int ret, i, j, k; + int i, j, k; k = *num_keys; @@ -277,15 +278,12 @@ static int ldap_set_keytab(const char *servername, { int version; LDAP *ld = NULL; - BerElement *ctrl = NULL; BerElement *sctrl = NULL; struct berval *control = NULL; - struct berval **ncvals; - char *ldap_base = NULL; char *retoid = NULL; struct berval *retdata = NULL; struct timeval tv; - LDAPMessage *entry, *res = NULL; + LDAPMessage *res = NULL; LDAPControl **srvctrl = NULL; LDAPControl *pprc = NULL; char *err = NULL; @@ -293,7 +291,6 @@ static int ldap_set_keytab(const char *servername, int ret, rc; int kvno, i; ber_tag_t rtag; - struct berval bv; ber_int_t *encs = NULL; /* cant' return more than num_keys, sometimes less */ |