From: Ezra Peisach Date: Tue, 12 Jun 2001 15:01:57 +0000 (+0000) Subject: * sn2princ.c, hst_realm.c, an_to_ln.c: Cast argument to X-Git-Tag: krb5-1.3-alpha1~1423 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=33bf8148d5adc0627984e61c9a4a4d1c2543f1f3;p=krb5.git * sn2princ.c, hst_realm.c, an_to_ln.c: Cast argument to isupper()/isspace()/islower() to int. * t_std_conf.c (test_locate_kdc): krb5_locate_kdc expects a struct sockaddr *** as a third argument instead of sockaddr **. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13339 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 68b34aa5a..2767311a5 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,11 @@ +2001-06-12 Ezra Peisach + + * sn2princ.c, hst_realm.c, an_to_ln.c: Cast argument to + isupper()/isspace()/islower() to int. + + * t_std_conf.c (test_locate_kdc): krb5_locate_kdc expects a struct + sockaddr *** as a third argument instead of sockaddr **. + 2001-06-07 Ezra Peisach * ktdefname.c (krb5_kt_default_name): Get rid of a variable that diff --git a/src/lib/krb5/os/an_to_ln.c b/src/lib/krb5/os/an_to_ln.c index c5e97fbe7..b9b0d6079 100644 --- a/src/lib/krb5/os/an_to_ln.c +++ b/src/lib/krb5/os/an_to_ln.c @@ -388,7 +388,7 @@ aname_replacer(string, contextp, result) */ for (cp = *contextp; *cp; ) { /* Skip leading whitespace */ - while (isspace(*cp)) + while (isspace((int) (*cp))) cp++; /* @@ -520,7 +520,7 @@ rule_an_to_ln(context, rule, aname, lnsize, lname) *cout = '\0'; current++; /* Point past number */ - while (isdigit(*current)) + while (isdigit((int) (*current))) current++; } else @@ -703,7 +703,7 @@ krb5_aname_to_localname(context, aname, lnsize_in, lname) /* Trim the value. */ cp = &mapping_values[nvalid-1] [strlen(mapping_values[nvalid-1])]; - while (isspace(*cp)) cp--; + while (isspace((int) (*cp))) cp--; cp++; *cp = '\0'; diff --git a/src/lib/krb5/os/hst_realm.c b/src/lib/krb5/os/hst_realm.c index c41e625cd..bfb1865e2 100644 --- a/src/lib/krb5/os/hst_realm.c +++ b/src/lib/krb5/os/hst_realm.c @@ -264,7 +264,7 @@ krb5_get_host_realm(context, host, realmsp) local_host[sizeof(local_host) - 1] = '\0'; for (cp = local_host; *cp; cp++) { - if (isupper(*cp)) + if (isupper((int) (*cp))) *cp = tolower(*cp); } l = strlen(local_host); @@ -347,7 +347,7 @@ krb5_get_host_realm(context, host, realmsp) /* Assume the realm name is upper case */ for (cp = realm; *cp; cp++) - if (islower(*cp)) + if (islower((int) (*cp))) *cp = toupper(*cp); } else { /* We are defaulting to the local realm */ diff --git a/src/lib/krb5/os/sn2princ.c b/src/lib/krb5/os/sn2princ.c index 0c48b5e2c..16b52df07 100644 --- a/src/lib/krb5/os/sn2princ.c +++ b/src/lib/krb5/os/sn2princ.c @@ -99,7 +99,7 @@ krb5_sname_to_principal(context, hostname, sname, type, ret_princ) if (type == KRB5_NT_SRV_HST) for (cp = remote_host; *cp; cp++) - if (isupper(*cp)) + if (isupper((int) (*cp))) *cp = tolower(*cp); /* diff --git a/src/lib/krb5/os/t_std_conf.c b/src/lib/krb5/os/t_std_conf.c index ab5058c0d..dcd309f33 100644 --- a/src/lib/krb5/os/t_std_conf.c +++ b/src/lib/krb5/os/t_std_conf.c @@ -107,7 +107,7 @@ static void test_locate_kdc(ctx, realm) krb5_context ctx; char *realm; { - struct sockaddr *addrs; + struct sockaddr **addrs; struct sockaddr_in *s_sin; int i, naddrs; int get_masters=0; @@ -119,12 +119,12 @@ static void test_locate_kdc(ctx, realm) retval = krb5_locate_kdc(ctx, &rlm, &addrs, &naddrs, get_masters); if (retval) { - com_err("krb5_get_krbhst", retval, 0); + com_err("krb5_locate_kdc", retval, 0); return; } - printf("krb_get_krbhst(%s) returned:", realm); + printf("krb_locate_kdc(%s) returned:", realm); for (i=0; i < naddrs; i++) { - s_sin = (struct sockaddr_in *) &addrs[i]; + s_sin = (struct sockaddr_in *) addrs[i]; printf(" %s/%d", inet_ntoa(s_sin->sin_addr), ntohs(s_sin->sin_port)); }