All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] gssd: Fix inner-loop variable reuse
Date: Wed, 16 Mar 2016 14:20:13 -0400	[thread overview]
Message-ID: <56E9A3DD.8050109@RedHat.com> (raw)
In-Reply-To: <7c093a92c6c61de8d4bf0f9620aea9ada789fe75.1456785264.git.bcodding@redhat.com>



On 02/29/2016 05:36 PM, Benjamin Coddington wrote:
> The var "i" is already in use iterating realmnames.
> 
> Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
> Fixes: "6597e391 gssd:  Don't assume the machine account will be in uppercase"
Committed... 

steved.

> ---
>  utils/gssd/krb5_util.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
> index 8ef8184..8dc64fe 100644
> --- a/utils/gssd/krb5_util.c
> +++ b/utils/gssd/krb5_util.c
> @@ -796,7 +796,7 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
>  	char **realmnames = NULL;
>  	char myhostname[NI_MAXHOST], targethostname[NI_MAXHOST];
>  	char myhostad[NI_MAXHOST+1];
> -	int i, j, retval;
> +	int i, j, k, retval;
>  	char *default_realm = NULL;
>  	char *realm;
>  	char *k5err = NULL;
> @@ -941,8 +941,8 @@ find_keytab_entry(krb5_context context, krb5_keytab kt, const char *tgtname,
>  				 * moving on to the svcname
>  				 */
>  				if (strcmp(svcnames[j],"$") == 0 && !tried_upper) {
> -					for (i = 0; myhostad[i] != '$'; ++i) {
> -						myhostad[i] = toupper(myhostad[i]);
> +					for (k = 0; myhostad[k] != '$'; ++k) {
> +						myhostad[k] = toupper(myhostad[k]);
>  					}
>  					j--;
>  					tried_upper = 1;
> 

      reply	other threads:[~2016-03-16 18:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-29 22:36 [PATCH] gssd: Fix inner-loop variable reuse Benjamin Coddington
2016-03-16 18:20 ` Steve Dickson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56E9A3DD.8050109@RedHat.com \
    --to=steved@redhat.com \
    --cc=bcodding@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.