diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-08-27 16:36:00 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-08-27 16:36:00 +0000 |
commit | 8acb29c6f3259749c85985c2df6b0cbd870c52f6 (patch) | |
tree | 0a79e57cf8714e3a10df69586ce445abe7c36a31 /src/lib/krb5/asn.1/asn1buf.c | |
parent | 6f207872f88b0c63e0ec81041f8c54b6b68f73f5 (diff) | |
download | krb5-8acb29c6f3259749c85985c2df6b0cbd870c52f6.tar.gz krb5-8acb29c6f3259749c85985c2df6b0cbd870c52f6.tar.xz krb5-8acb29c6f3259749c85985c2df6b0cbd870c52f6.zip |
Based on patch from lxs, with some changes:
Add several new gcc warning flags, used in the KfM build process.
Put declarations before code.
Fix a bunch of signed/unsigned type mixes, mostly by changing variable
types to unsigned int.
Fix constness in handling name of default ccache name.
Make sure functions get declared with prototypes:
krb5int_pthread_loaded krb5int_gmt_mktime krb5int_aes_encrypt
krb5int_aes_decrypt gssint_mecherrmap_init gssint_mecherramp_get.
Don't shadow global names: stat accept index open encrypt. Fix
variable shadowing in LDAP ASN.1 support.
Don't define unused krb5int_local_addresses.
Don't export internal krb5_change_set_password.
Fix error return indications from gssint_oid_to_mech.
Create and use k5-gmt_mktime.h to provide one global declaration of
krb5int_gmt_mktime, needed before we've generated krb5.h on some
platforms.
Not incorporated from initial patch: const changes in function
signatures.
ticket: 6096
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20697 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/asn1buf.c')
-rw-r--r-- | src/lib/krb5/asn.1/asn1buf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/krb5/asn.1/asn1buf.c b/src/lib/krb5/asn.1/asn1buf.c index c78f4b966..43ef97ca8 100644 --- a/src/lib/krb5/asn.1/asn1buf.c +++ b/src/lib/krb5/asn.1/asn1buf.c @@ -167,7 +167,7 @@ asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o) asn1_error_code asn1buf_insert_octetstring(asn1buf *buf, const unsigned int len, const krb5_octet *s) { asn1_error_code retval; - int length; + unsigned int length; retval = asn1buf_ensure_space(buf,len); if(retval) return retval; @@ -179,7 +179,7 @@ asn1_error_code asn1buf_insert_octetstring(asn1buf *buf, const unsigned int len, asn1_error_code asn1buf_insert_charstring(asn1buf *buf, const unsigned int len, const char *s) { asn1_error_code retval; - int length; + unsigned int length; retval = asn1buf_ensure_space(buf,len); if(retval) return retval; @@ -198,7 +198,7 @@ asn1_error_code asn1buf_remove_octet(asn1buf *buf, asn1_octet *o) asn1_error_code asn1buf_remove_octetstring(asn1buf *buf, const unsigned int len, asn1_octet **s) { - int i; + unsigned int i; if (len > buf->bound + 1 - buf->next) return ASN1_OVERRUN; if (len == 0) { @@ -216,7 +216,7 @@ asn1_error_code asn1buf_remove_octetstring(asn1buf *buf, const unsigned int len, asn1_error_code asn1buf_remove_charstring(asn1buf *buf, const unsigned int len, char **s) { - int i; + unsigned int i; if (len > buf->bound + 1 - buf->next) return ASN1_OVERRUN; if (len == 0) { @@ -247,7 +247,7 @@ int asn1buf_remains(asn1buf *buf, int indef) asn1_error_code asn12krb5_buf(const asn1buf *buf, krb5_data **code) { - int i; + unsigned int i; *code = (krb5_data*)calloc(1,sizeof(krb5_data)); if(*code == NULL) return ENOMEM; (*code)->magic = KV5M_DATA; @@ -284,7 +284,7 @@ asn1_error_code asn1buf_unparse(const asn1buf *buf, char **s) strcpy(*s,"<EMPTY>"); }else{ unsigned int length = asn1buf_len(buf); - int i; + unsigned int i; *s = calloc(length+1, sizeof(char)); if(*s == NULL) return ENOMEM; @@ -338,7 +338,7 @@ int asn1buf_size(const asn1buf *buf) } #undef asn1buf_free -int asn1buf_free(const asn1buf *buf) +unsigned int asn1buf_free(const asn1buf *buf) { if(buf == NULL || buf->base == NULL) return 0; else return buf->bound - buf->next + 1; |