diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-07-19 09:42:05 -0700 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-07-19 09:42:05 -0700 |
commit | ffedc6bef9bd5b23843604a8bd16a684c9c7339a (patch) | |
tree | 352664012697b2891b5fd746198cd91db18391a9 /contrib | |
parent | 52735395c53a5cdf71d79ea9eb299572bf3f7249 (diff) | |
download | rspamd-ffedc6bef9bd5b23843604a8bd16a684c9c7339a.tar.gz rspamd-ffedc6bef9bd5b23843604a8bd16a684c9c7339a.zip |
Update to the recent versions.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/uthash/utstring.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/uthash/utstring.h b/contrib/uthash/utstring.h index 4ef7b5690..f11f34b77 100644 --- a/contrib/uthash/utstring.h +++ b/contrib/uthash/utstring.h @@ -44,6 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. typedef struct { char *d; + void **pd; size_t n; /* allocd size */ size_t i; /* index of first unused byte */ } UT_string; @@ -54,6 +55,7 @@ do { \ (s)->d = (char*)realloc((s)->d, (s)->n + amt); \ if ((s)->d == NULL) oom(); \ (s)->n += amt; \ + if ((s)->pd) *((s)->pd) = (s)->d; \ } \ } while(0) @@ -78,7 +80,7 @@ do { \ #define utstring_new(s) \ do { \ - s = (UT_string*)calloc(sizeof(UT_string),1); \ + s = (UT_string*)calloc(1, sizeof(UT_string)); \ if (!s) oom(); \ utstring_init(s); \ } while(0) |