diff options
author | Ken Raeburn <raeburn@mit.edu> | 2008-08-07 00:13:58 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2008-08-07 00:13:58 +0000 |
commit | aabbe4fe034c2dd69b372e4cf4394c7fb4367dd3 (patch) | |
tree | 89f55a55f03d047c12f9ae618901bd8857bf5877 /src/lib/krb5/asn.1/asn1buf.h | |
parent | aefad499048b709e81c5550ea49cf6a91c2bdde3 (diff) | |
download | krb5-aabbe4fe034c2dd69b372e4cf4394c7fb4367dd3.zip krb5-aabbe4fe034c2dd69b372e4cf4394c7fb4367dd3.tar.gz krb5-aabbe4fe034c2dd69b372e4cf4394c7fb4367dd3.tar.bz2 |
Rewrite tagnum-checking code to streamline normal path and push refined
error code selection into error path.
Don't expand asn1buf_insert_octet inline or define asn1buf_ensure_space
macro if CONFIG_SMALL.
Remove some null-before-free checks.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20626 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/asn1buf.h')
-rw-r--r-- | src/lib/krb5/asn.1/asn1buf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/krb5/asn.1/asn1buf.h b/src/lib/krb5/asn.1/asn1buf.h index c9c956a..4936ed6 100644 --- a/src/lib/krb5/asn.1/asn1buf.h +++ b/src/lib/krb5/asn.1/asn1buf.h @@ -39,10 +39,12 @@ asn1_error_code asn1buf_ensure_space effects If buf has less than amount octets of free space, then it is expanded to have at least amount octets of free space. Returns ENOMEM memory is exhausted. */ +#ifndef CONFIG_SMALL #define asn1buf_ensure_space(buf,amount) \ ((asn1buf_free(buf) < (amount)) \ ? (asn1buf_expand((buf), (amount)-asn1buf_free(buf))) \ : 0) +#endif asn1_error_code asn1buf_expand @@ -146,7 +148,7 @@ asn1_error_code asn1buf_insert_octet /* requires *buf is allocated effects Inserts o into the buffer *buf, expanding the buffer if necessary. Returns ENOMEM memory is exhausted. */ -#if ((__GNUC__ >= 2) && !defined(ASN1BUF_OMIT_INLINE_FUNCS)) +#if ((__GNUC__ >= 2) && !defined(ASN1BUF_OMIT_INLINE_FUNCS)) && !defined(CONFIG_SMALL) extern __inline__ asn1_error_code asn1buf_insert_octet(asn1buf *buf, const int o) { asn1_error_code retval; |