Ensure consistancy between prototypes and functions
authorEzra Peisach <epeisach@mit.edu>
Mon, 19 Feb 2007 02:37:10 +0000 (02:37 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 19 Feb 2007 02:37:10 +0000 (02:37 +0000)
I am using an older compiler that is complaining that prototypes
do not match the functions they reference.  The issue is that a number
of prototypes are using "const int foo" while the function is "int foo".
From a caller sense it makes no difference - but the compiler is correct
they are different.

All is now consistant.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19169 dc483132-0cff-0310-8789-dd5450dbe970

src/include/k5-int.h
src/lib/crypto/crc32/crc-32.h
src/lib/gssapi/krb5/acquire_cred.c
src/lib/gssapi/mechglue/mglueP.h
src/lib/krb5/asn.1/asn1_make.h
src/lib/krb5/asn.1/asn1buf.h
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/in_tkt_sky.c
src/lib/krb5/os/an_to_ln.c

index d84449803f11d27b545d8c925b667b6c20f14b16..2ff107c4b04f0f6ae3dd8159ab9e49f789db994a 100644 (file)
@@ -1686,7 +1686,7 @@ krb5_error_code krb5_encrypt_tkt_part
 
 krb5_error_code krb5_encode_kdc_rep
        (krb5_context,
-               const krb5_msgtype,
+               krb5_msgtype,
                const krb5_enc_kdc_rep_part *,
                int using_subkey,
                const krb5_keyblock *,
index 10facaa587baa323304d9a2b0269d5b5377f88a0..0efc0062546d61ac8fd429ba04f8d943a8f9a03a 100644 (file)
 #define CRC32_CKSUM_LENGTH     4
 
 void
-mit_crc32 (const krb5_pointer in, size_t in_length, unsigned long *c);
+mit_crc32 (krb5_pointer in, size_t in_length, unsigned long *c);
 
 #ifdef CRC32_SHIFT4
-void mit_crc32_shift4(const krb5_pointer /* in */,
-                     const size_t /* in_length */,
+void mit_crc32_shift4(krb5_pointer /* in */,
+                     size_t /* in_length */,
                      unsigned long * /* cksum */);
 #endif
 
index 3f213a12eefec23f1cfda58d8eb05ac6687632ea..43d21220cebda70e63e41db34c462332bb54d648 100644 (file)
@@ -566,7 +566,7 @@ krb5_gss_acquire_cred(minor_status, desired_name, time_req,
 
    /* if the princ wasn't filled in already, fill it in now */
 
-   if (!cred->princ && (desired_name != GSS_C_NO_CREDENTIAL))
+   if (!cred->princ && (desired_name != GSS_C_NO_NAME))
       if ((code = krb5_copy_principal(context, (krb5_principal) desired_name,
                                      &(cred->princ)))) {
         if (cred->ccache)
index 70da996d1684962a7ab8f121c6434142035b0818..85ae002c35a532cc5bd5cd48f7b7949d9aa14700 100644 (file)
@@ -427,7 +427,7 @@ OM_uint32 gssint_create_copy_buffer(
 
 OM_uint32 gssint_copy_oid_set(
        OM_uint32 *,                    /* minor_status */
-       const gss_OID_set_desc *,       /* oid set */
+       const gss_OID_set_desc * const, /* oid set */
        gss_OID_set *                   /* new oid set */
 );
 
index 7150549085fc76b1b0a86cd7623931674f169f16..de13d7b52018113e7a0e4c78440fcfedc4f80bf8 100644 (file)
@@ -48,9 +48,9 @@
 
 asn1_error_code asn1_make_etag
        (asn1buf *buf,
-                  const asn1_class asn1class,
-                  const asn1_tagnum tagnum,
-                  const unsigned int in_len,
+                  asn1_class asn1class,
+                  asn1_tagnum tagnum,
+                  unsigned int in_len,
                   unsigned int *retlen);
 /* requires  *buf is allocated, in_len is the length of an ASN.1 encoding
              which has just been inserted in *buf
@@ -61,10 +61,10 @@ asn1_error_code asn1_make_etag
             Returns ENOMEM if memory runs out. */
 
 asn1_error_code asn1_make_tag
-       (asn1buf *buf, const asn1_class asn1class,
-                  const asn1_construction construction,
-                  const asn1_tagnum tagnum,
-                  const unsigned int in_len,
+       (asn1buf *buf, asn1_class asn1class,
+                  asn1_construction construction,
+                  asn1_tagnum tagnum,
+                  unsigned int in_len,
                   unsigned int *retlen);
 /* requires  *buf is allocated, in_len is the length of an ASN.1 encoding
              which has just been inserted in *buf
@@ -121,9 +121,9 @@ asn1_error_code asn1_make_length
 /* "helper" procedure for asn1_make_tag */
 asn1_error_code asn1_make_id
        (asn1buf *buf,
-                  const asn1_class asn1class,
-                  const asn1_construction construction,
-                  const asn1_tagnum tagnum,
+                  asn1_class asn1class,
+                  asn1_construction construction,
+                  asn1_tagnum tagnum,
                   unsigned int *retlen);
 /* requires  *buf is allocated, asn1class and tagnum are appropriate for
              the ASN.1 encoding which has just been inserted in *buf
index 854801edd5df886b9b748ac959ab004404cfea59..c9c956adfa9f8b6d68d2ad4990b559dfe31f487c 100644 (file)
@@ -122,10 +122,10 @@ asn1_error_code asn1buf_imbed
              position starts at the beginning of *subbuf. */
 
 asn1_error_code asn1buf_sync
-       (asn1buf *buf, asn1buf *subbuf, const asn1_class Class, 
-                  const asn1_tagnum lasttag,
-                  const unsigned int length, const int indef,
-                  const int seqindef);
+       (asn1buf *buf, asn1buf *subbuf, asn1_class Class, 
+                  asn1_tagnum lasttag,
+                  unsigned int length, int indef,
+                  int seqindef);
 /* requires  *subbuf is a sub-buffer of *buf, as created by asn1buf_imbed.
              lasttag is the last tagnumber read.
    effects   Synchronizes *buf's current position to match that of *subbuf. */
index ee0a1127e7568ac280a4cff5c1a3ea8737fc3343..937cdc4c9f40d015890150851c622ac7cd63ffde 100644 (file)
@@ -65,7 +65,7 @@
 /* some typedef's for the function args to make things look a bit cleaner */
 
 typedef krb5_error_code (*git_key_proc) (krb5_context,
-                                                  const krb5_enctype,
+                                                  krb5_enctype,
                                                   krb5_data *,
                                                   krb5_const_pointer,
                                                   krb5_keyblock **);
@@ -440,7 +440,7 @@ static const krb5_enctype get_in_tkt_enctypes[] = {
 
 krb5_error_code KRB5_CALLCONV
 krb5_get_in_tkt(krb5_context context,
-               const krb5_flags options,
+               krb5_flags options,
                krb5_address * const * addrs,
                krb5_enctype * ktypes,
                krb5_preauthtype * ptypes,
index 6de2075504abfcda02e2d443e3015a13c4f17170..75edb55da4553420103fcd326437a13c48acc440 100644 (file)
@@ -40,13 +40,6 @@ struct skey_keyproc_arg {
  * "keyseed" is actually a krb5_keyblock *, or NULL if we should fetch
  * from system area.
  */
-static krb5_error_code skey_keyproc
-    (krb5_context,
-               const krb5_enctype,
-               krb5_data *,
-               krb5_const_pointer,
-               krb5_keyblock **);
-
 static krb5_error_code
 skey_keyproc(krb5_context context, krb5_enctype type, krb5_data *salt,
             krb5_const_pointer keyseed, krb5_keyblock **key)
index 73465d66c9be3c9de261b131036f495af82782de..1df75b188ba1cbf05a0c74da226fb7705017d5fe 100644 (file)
@@ -675,7 +675,7 @@ default_an_to_ln(krb5_context context, krb5_const_principal aname, const unsigne
 */
 
 krb5_error_code KRB5_CALLCONV
-krb5_aname_to_localname(krb5_context context, krb5_const_principal aname, const int lnsize_in, char *lname)
+krb5_aname_to_localname(krb5_context context, krb5_const_principal aname, int lnsize_in, char *lname)
 {
     krb5_error_code    kret;
     char               *realm;