If we're going to be passing a negative value for the size of a stringfield,
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 15 Nov 2007 23:50:15 +0000 (23:50 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 15 Nov 2007 23:50:15 +0000 (23:50 +0000)
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

include/asterisk/stringfields.h
main/utils.c

index 5fe0fc3..f842601 100644 (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 */
 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
index 49e559d..d948891 100644 (file)
@@ -1244,7 +1244,7 @@ static int add_string_pool(struct ast_string_field_mgr *mgr,
  *     This must be done before destroying the object.
  */
 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;
        struct ast_string_field_pool *cur = *pool_head;