* [PATCH] gssd: Fix inner-loop variable reuse
@ 2016-02-29 22:36 Benjamin Coddington
2016-03-16 18:20 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Coddington @ 2016-02-29 22:36 UTC (permalink / raw)
To: steved; +Cc: linux-nfs
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"
---
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] gssd: Fix inner-loop variable reuse
2016-02-29 22:36 [PATCH] gssd: Fix inner-loop variable reuse Benjamin Coddington
@ 2016-03-16 18:20 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2016-03-16 18:20 UTC (permalink / raw)
To: Benjamin Coddington; +Cc: linux-nfs
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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-16 18:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-29 22:36 [PATCH] gssd: Fix inner-loop variable reuse Benjamin Coddington
2016-03-16 18:20 ` Steve Dickson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).