If we're going to be passing a negative value for the size of a stringfield,

in order to indicate something, then using an UNSIGNED parameter is bad,
mmmmmkay?


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2007-11-15 23:50:15 +00:00
parent 7c4df5c827
commit 8309f54e39
2 changed files with 2 additions and 2 deletions

View File

@@ -230,7 +230,7 @@ void __ast_string_field_ptr_build_va(struct ast_string_field_mgr *mgr,
/*! \internal \brief internal version of ast_string_field_init */ /*! \internal \brief internal version of ast_string_field_init */
int __ast_string_field_init(struct ast_string_field_mgr *mgr, int __ast_string_field_init(struct ast_string_field_mgr *mgr,
struct ast_string_field_pool **pool_head, size_t needed); struct ast_string_field_pool **pool_head, int needed);
/*! /*!
\brief Set a field to a simple string value \brief Set a field to a simple string value

View File

@@ -1244,7 +1244,7 @@ static int add_string_pool(struct ast_string_field_mgr *mgr,
* This must be done before destroying the object. * This must be done before destroying the object.
*/ */
int __ast_string_field_init(struct ast_string_field_mgr *mgr, int __ast_string_field_init(struct ast_string_field_mgr *mgr,
struct ast_string_field_pool **pool_head, size_t size) struct ast_string_field_pool **pool_head, int size)
{ {
const char **p = (const char **)pool_head + 1; const char **p = (const char **)pool_head + 1;
struct ast_string_field_pool *cur = *pool_head; struct ast_string_field_pool *cur = *pool_head;