From: Ezra Peisach Date: Fri, 15 Jun 2001 18:58:55 +0000 (+0000) Subject: * cmds.c, domacro.c: Cast arguments to isspace() and isdigit() X-Git-Tag: krb5-1.3-alpha1~1417 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c81515e2d155a65324f0961c61b7ee04ed93a806;p=krb5.git * cmds.c, domacro.c: Cast arguments to isspace() and isdigit() from char to int. * ftp.c: krb5_mk_priv(), krb5_mk_safe() expect C_Block *. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13350 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index ba6f78147..eea5fba37 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,10 @@ +2001-06-15 Ezra Peisach + + * cmds.c, domacro.c: Cast arguments to isspace() and isdigit() + from char to int. + + * ftp.c: krb5_mk_priv(), krb5_mk_safe() expect C_Block *. + 2001-05-01 Ken Raeburn * cmds.c (setpeer): Port number should be unsigned short. (Patch diff --git a/src/appl/gssftp/ftp/cmds.c b/src/appl/gssftp/ftp/cmds.c index f0f26df67..f0da69abf 100644 --- a/src/appl/gssftp/ftp/cmds.c +++ b/src/appl/gssftp/ftp/cmds.c @@ -726,14 +726,14 @@ void mput(argc, argv) if (mflag && confirm(argv[0], cp)) { tp = cp; if (mcase) { - while (*tp && !islower(*tp)) { + while (*tp && !islower((int) (*tp))) { tp++; } if (!*tp) { tp = cp; tp2 = tmpbuf; while ((*tp2 = *tp) != 0) { - if (isupper(*tp2)) { + if (isupper((int) *tp2)) { *tp2 = 'a' + *tp2 - 'A'; } tp++; @@ -865,14 +865,14 @@ usage: if (loc && mcase) { char *tp = argv[1], *tp2, tmpbuf[MAXPATHLEN]; - while (*tp && !islower(*tp)) { + while (*tp && !islower((int) *tp)) { tp++; } if (!*tp) { tp = argv[2]; tp2 = tmpbuf; while ((*tp2 = *tp) != 0) { - if (isupper(*tp2)) { + if (isupper((int) *tp2)) { *tp2 = 'a' + *tp2 - 'A'; } tp++; @@ -995,14 +995,14 @@ void mget(argc, argv) if (mflag && confirm(argv[0], cp)) { tp = cp; if (mcase) { - while (*tp && !islower(*tp)) { + while (*tp && !islower((int) *tp)) { tp++; } if (!*tp) { tp = cp; tp2 = tmpbuf; while ((*tp2 = *tp) != 0) { - if (isupper(*tp2)) { + if (isupper((int) *tp2)) { *tp2 = 'a' + *tp2 - 'A'; } tp++; @@ -2140,7 +2140,7 @@ domap(name) break; case '[': LOOP: - if (*++cp2 == '$' && isdigit(*(cp2+1))) { + if (*++cp2 == '$' && isdigit((int) *(cp2+1))) { if (*++cp2 == '0') { char *cp3 = name; @@ -2165,7 +2165,7 @@ LOOP: cp2++; } else if (*cp2 == '$' && - isdigit(*(cp2+1))) { + isdigit((int) *(cp2+1))) { if (*++cp2 == '0') { char *cp3 = name; @@ -2217,7 +2217,7 @@ LOOP: } break; case '$': - if (isdigit(*(cp2 + 1))) { + if (isdigit((int) *(cp2 + 1))) { if (*++cp2 == '0') { char *cp3 = name; diff --git a/src/appl/gssftp/ftp/domacro.c b/src/appl/gssftp/ftp/domacro.c index f76690ffd..50684a72b 100644 --- a/src/appl/gssftp/ftp/domacro.c +++ b/src/appl/gssftp/ftp/domacro.c @@ -75,7 +75,7 @@ void domacro(argc, argv) TOP: cp1 = macros[i].mac_start; while (cp1 != macros[i].mac_end) { - while (isspace(*cp1)) { + while (isspace((int) *cp1)) { cp1++; } cp2 = line; @@ -85,9 +85,9 @@ TOP: *cp2++ = *++cp1; break; case '$': - if (isdigit(*(cp1+1))) { + if (isdigit((int) *(cp1+1))) { j = 0; - while (isdigit(*++cp1)) { + while (isdigit((int) (*++cp1))) { j = 10*j + *cp1 - '0'; } cp1--; diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c index 17be15c3a..452c71335 100644 --- a/src/appl/gssftp/ftp/ftp.c +++ b/src/appl/gssftp/ftp/ftp.c @@ -411,9 +411,9 @@ static int secure_command(cmd) if ((length = clevel == PROT_P ? krb_mk_priv((unsigned char *)cmd, (unsigned char *)out, strlen(cmd), schedule, - cred.session, &myctladdr, &hisctladdr) + &cred.session, &myctladdr, &hisctladdr) : krb_mk_safe((unsigned char *)cmd, (unsigned char *)out, - strlen(cmd), cred.session, + strlen(cmd), &cred.session, &myctladdr, &hisctladdr)) == -1) { fprintf(stderr, "krb_mk_%s failed for KERBEROS_V4\n", clevel == PROT_P ? "priv" : "safe"); @@ -687,12 +687,12 @@ int getreply(expecteof) if ((kerror = safe ? krb_rd_safe((unsigned char *)ibuf, (unsigned int) len, - cred.session, + &cred.session, &hisctladdr, &myctladdr, &msg_data) : krb_rd_priv((unsigned char *)ibuf, (unsigned int) len, - schedule, cred.session, + schedule, &cred.session, &hisctladdr, &myctladdr, &msg_data)) != KSUCCESS) { @@ -1990,7 +1990,7 @@ int do_auth() GSS_C_NO_CREDENTIAL, &gcontext, target_name, - *gss_trials[trial].mech_type, + (gss_OID_desc *)*gss_trials[trial].mech_type, GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG | (forward ? GSS_C_DELEG_FLAG : (unsigned) 0), @@ -2122,7 +2122,7 @@ int do_auth() fprintf(stderr, "Base 64 decoding failed: %s\n", radix_error(kerror)); else if ((kerror = krb_rd_safe(out_buf, (unsigned )i, - cred.session, + &cred.session, &hisctladdr, &myctladdr, &msg_data))) fprintf(stderr, "Kerberos V4 krb_rd_safe failed: %s\n",