[Freeipa-devel] [PATCH] 057 Bad return values for ipa-rmkeytab command
Simo Sorce
simo at redhat.com
Tue May 3 12:30:28 UTC 2011
On Mon, 2011-05-02 at 11:04 +0200, Martin Kosek wrote:
> diff --git a/ipa-client/ipa-rmkeytab.c b/ipa-client/ipa-rmkeytab.c
> index
> 8afa9e1c4ea822554af436bf4644d717d922f56e..73a74070cf696f1e2b9fe3c8374446b68cc48441 100644
> --- a/ipa-client/ipa-rmkeytab.c
> +++ b/ipa-client/ipa-rmkeytab.c
> @@ -108,6 +108,7 @@ remove_realm(krb5_context context, krb5_keytab
> ktid, const char *realm, int debu
> krb5_kt_cursor kt_cursor;
> char * entry_princ_s = NULL;
> int rval = 0;
> + char realm_found = FALSE;
-----^^^^^---------------^^^^^^--
> krberr = krb5_kt_start_seq_get(context, ktid, &kt_cursor);
> memset(&entry, 0, sizeof(entry));
> @@ -128,6 +129,7 @@ remove_realm(krb5_context context, krb5_keytab
> ktid, const char *realm, int debu
> krb5_kt_end_seq_get(context, ktid, &kt_cursor);
>
> if (strstr(entry_princ_s, realm) != NULL) {
> + realm_found = TRUE;
---------------------------^^^^^^^
> rval = remove_principal(context, ktid, entry_princ_s,
> debug);
> if (rval != 0)
> goto done;
> @@ -136,6 +138,11 @@ remove_realm(krb5_context context, krb5_keytab
> ktid, const char *realm, int debu
> }
> }
Nack, please use 'bool', 'false' and 'true' here, not 'char' and
uppercase boolean value names.
Simo.
--
Simo Sorce * Red Hat, Inc * New York
More information about the Freeipa-devel
mailing list