From: Keith Vetter Date: Thu, 9 Mar 1995 03:29:21 +0000 (+0000) Subject: Some int/long, signed/unsigned conversions X-Git-Tag: krb5-1.0-beta5~579 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9622d145a30e1e5a0cf7951e319130caf407092;p=krb5.git Some int/long, signed/unsigned conversions git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5093 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index ba5155727..529fbed4b 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,3 +1,9 @@ +Tue Mar 7 19:57:28 1995 Keith Vetter (keithv@fusion.com) + + * pcbc_enc.c: added casts on the long->char assignments. + * str_to_key.c: converted int->long to match types. + * read_passwd.c: converted int->long. + Wed Mar 8 17:13:44 1995 Theodore Y. Ts'o * Makefile.in (clean): Dete verify.o on a "make clean". diff --git a/src/lib/des425/pcbc_encrypt.c b/src/lib/des425/pcbc_encrypt.c index ea8948b7e..39744b6c9 100644 --- a/src/lib/des425/pcbc_encrypt.c +++ b/src/lib/des425/pcbc_encrypt.c @@ -233,21 +233,21 @@ des_pcbc_encrypt(in, out, length, schedule, ivec, encrypt) op += (int) length; switch(length) { case 8: - *(--op) = right & 0xff; + *(--op) = (unsigned char) (right & 0xff); case 7: - *(--op) = (right >> 8) & 0xff; + *(--op) = (unsigned char) ((right >> 8) & 0xff); case 6: - *(--op) = (right >> 16) & 0xff; + *(--op) = (unsigned char) ((right >> 16) & 0xff); case 5: - *(--op) = (right >> 24) & 0xff; + *(--op) = (unsigned char) ((right >> 24) & 0xff); case 4: - *(--op) = left & 0xff; + *(--op) = (unsigned char) (left & 0xff); case 3: - *(--op) = (left >> 8) & 0xff; + *(--op) = (unsigned char) ((left >> 8) & 0xff); case 2: - *(--op) = (left >> 16) & 0xff; + *(--op) = (unsigned char) ((left >> 16) & 0xff); case 1: - *(--op) = (left >> 24) & 0xff; + *(--op) = (unsigned char) ((left >> 24) & 0xff); break; } break; /* we're done */ diff --git a/src/lib/des425/read_passwd.c b/src/lib/des425/read_passwd.c index e62285978..b010b5127 100644 --- a/src/lib/des425/read_passwd.c +++ b/src/lib/des425/read_passwd.c @@ -38,7 +38,7 @@ des_read_password/*_v4_compat_crock*/(k,prompt,verify) char *prompt; int verify; { - int ok; + krb5_error_code ok; krb5_error_code retval; char key_string[BUFSIZ]; char prompt2[BUFSIZ]; diff --git a/src/lib/des425/str_to_key.c b/src/lib/des425/str_to_key.c index 4330e44cd..2222897e5 100644 --- a/src/lib/des425/str_to_key.c +++ b/src/lib/des425/str_to_key.c @@ -54,9 +54,9 @@ des_string_to_key(str,key) register mit_des_cblock *key; { register char *in_str; - register unsigned temp,i; + register unsigned temp; register int j; - register long length; + register long i, length; static unsigned char *k_p; static int forward; register char *p_char;