Some int/long, signed/unsigned conversions
authorKeith Vetter <keithv@fusion.com>
Thu, 9 Mar 1995 03:29:21 +0000 (03:29 +0000)
committerKeith Vetter <keithv@fusion.com>
Thu, 9 Mar 1995 03:29:21 +0000 (03:29 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5093 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/des425/ChangeLog
src/lib/des425/pcbc_encrypt.c
src/lib/des425/read_passwd.c
src/lib/des425/str_to_key.c

index ba515572788ed348e688aa5cc061a5fb6966abe0..529fbed4bdefd784c38ad1ece44e9146fa9ff22f 100644 (file)
@@ -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  <tytso@dcl>
 
        * Makefile.in (clean): Dete verify.o on a "make clean".
index ea8948b7eb0ddb8b66952ccd21251b771ebfd1c6..39744b6c96ea18c97036d314b6fcffacbc5434b8 100644 (file)
@@ -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 */
index e622859786b5e051a89c3e6d46d1db092de22480..b010b51278562090eded567424e92c5c8613ce8a 100644 (file)
@@ -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];
index 4330e44cd4e7b35a7ef7693db001ba04909a5eee..2222897e577be5b041546031399ef19a21218275 100644 (file)
@@ -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;