Several small 16 vs 32 bit casts
authorKeith Vetter <keithv@fusion.com>
Thu, 2 Mar 1995 02:15:25 +0000 (02:15 +0000)
committerKeith Vetter <keithv@fusion.com>
Thu, 2 Mar 1995 02:15:25 +0000 (02:15 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5056 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/asn1_decode.c
src/lib/krb5/asn.1/asn1_encode.c
src/lib/krb5/asn.1/asn1_k_encode.c
src/lib/krb5/asn.1/asn1_k_encode.h
src/lib/krb5/asn.1/asn1_misc.c

index 1278a1ea7eebc00087fe5ac7e843d4d818bbc479..b0681b65d80b6da377404f04d68b03e7eee1b2e0 100644 (file)
@@ -1,3 +1,9 @@
+Wed Mar 1 18:00:00 1995 Keith Vetter (keithv@fusion.com)
+
+       * asn1_decode.c, asn1_encode.c, ans1_k_encode.c, asn1_misc.c: 16 vs 
+          32 bit casts.
+       * asn1_k_encode.h: added missing INTERFACE to a prototype
+
 Tue Feb 28 00:32:48 1995  John Gilmore  (gnu at toad.com)
 
        * asn1_decode.h, asn1_encode.h, asn1_get.h, asn1_k_decode.h,
index 7b033d20047a1beaba91aee543dd1003f8e6804c..b2f11db25c8ffa6b69ebab57fc9b20eb3c1bd5c7 100644 (file)
@@ -172,6 +172,7 @@ asn1_error_code INTERFACE asn1_decode_generaltime(buf, val)
   char *s;
   struct tm ts;
   time_t t;
+  time_t gmt_mktime PROTOTYPE((struct tm *));
 
   tag(ASN1_GENERALTIME);
 
index c620d9f2d6ff3699098709b414538dc7e9e068c6..a91520b041b56c1f23bc844455e73bc877c109c7 100644 (file)
@@ -38,7 +38,7 @@ asn1_error_code INTERFACE asn1_encode_integer(buf, val, retlen)
   
   valcopy = val;
   do {
-    digit = valcopy&0xFF;
+    digit = (int) (valcopy&0xFF);
     retval = asn1buf_insert_octet(buf,(asn1_octet) digit);
     if(retval) return retval;
     length++;
@@ -75,7 +75,7 @@ asn1_error_code INTERFACE asn1_encode_unsigned_integer(buf, val, retlen)
   
   valcopy = val;
   do {
-    digit = valcopy&0xFF;
+    digit = (int) (valcopy&0xFF);
     retval = asn1buf_insert_octet(buf,(asn1_octet) digit);
     if(retval) return retval;
     length++;
index 2cde64463082ceeeeb70222b741b70fe17c10164..77858f62555a37331f3771ed34312fc0a663260a 100644 (file)
@@ -149,7 +149,7 @@ asn1_error_code INTERFACE asn1_encode_principal_name(buf, val, retlen)
 
   if(val == NULL || val->data == NULL) return ASN1_MISSING_FIELD;
 
-  for(n = (val->length)-1; n >= 0; n--){
+  for(n = (int) ((val->length)-1); n >= 0; n--){
     if(val->data[n].data == NULL) return ASN1_MISSING_FIELD;
     retval = asn1_encode_generalstring(buf,
                                       (val->data)[n].length,
index d0000ebdff48b9f082220c721d490c799172a1f3..93be05da3dc228b0ae7eb9c1562d2bdc4ad70273 100644 (file)
@@ -170,7 +170,7 @@ asn1_error_code INTERFACE asn1_encode_last_req
        PROTOTYPE((asn1buf *buf, const krb5_last_req_entry **val,
                   int *retlen));
 
-asn1_error_code asn1_encode_sequence_of_pa_data
+asn1_error_code INTERFACE asn1_encode_sequence_of_pa_data
        PROTOTYPE((asn1buf *buf, const krb5_pa_data **val, int *retlen));
 
 asn1_error_code INTERFACE asn1_encode_sequence_of_ticket
index ce6f7b5342f8f40284a21a64a96200b6d0fa5eb4..3231a6385c61901903f23949b1aac52e7eb2986e 100644 (file)
@@ -22,6 +22,8 @@
  */
 
 #include "asn1_misc.h"
+#include <malloc.h>
+#include <memory.h>
 
 asn1_error_code INTERFACE asn1_krb5_realm_copy(target, source)
      krb5_principal target;