aboutsummaryrefslogtreecommitdiff
path: root/src/lib/array.c
AgeCommit message (Collapse)AuthorLines
2020-10-22global: Use SIZE_MAX instead of (size_t)-1Aki Tuomi-1/+1
2019-01-10lib: array - Fix asserts to work correctly on 32-bit systemsAki Tuomi-1/+1
2018-01-01Updated copyright notices to include the year 2018.Stephan Bosch-1/+1
2017-12-15lib: array_idx_modifiable changed not to allocate space.Sergey Kitov-1/+8
2017-01-01Updated copyright notices to include the year 2017.Stephan Bosch-1/+1
2016-12-16global: Change string position/length from unsigned int to size_tTimo Sirainen-3/+5
Mainly to avoid truncating >4GB strings, which might potentially cause some security holes. Normally there are other limits, which prevent such excessive strings from being created in the first place. I'm sure this didn't find everything. Maybe everything could be found with compiler warnings. -Wconversion kind of does it, but it gives way too many unnecessary warnings. These were mainly found with: grep " = strlen" egrep "unsigned int.*(size|len)"
2016-05-03global: Avoid using buffer_get_data()Timo Sirainen-1/+1
Especially buffer_get_data(buf, NULL) generates worse code than just using buf->data directly.
2016-01-13global: freshen copyrightTimo Sirainen-1/+1
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/'
2015-12-14lib: Avoid passing NULL to qsort() or bsearch() on empty array.Timo Sirainen-0/+2
This wouldn't normally matter because count=0 so it wouldn't be dereferenced anyway. But it triggered a run-time warning from clang, so lets fix it.
2015-09-23Remove now-unnecessary direct stdlib.h #includes.Teemu Huovila-1/+0
2015-01-05global: freshen copyrightPhil Carmody-1/+1
Robomatically: git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/' Happy 2015 everyone! Signed-off-by: Phil Carmody <phil@dovecot.fi>
2015-01-05lib: array - new linear search helperPhil Carmody-0/+16
There are large numbers of array_foreach loops which do nothing but search for the first element which matches some key. This can be abstracted out into a helper. Signed-off-by: Phil Carmody <phil@dovecot.fi>
2014-12-17lib: Small optimization / unnecessary code removal from array_*() functions.Timo Sirainen-27/+6
2014-11-25lib: array - element-wise comparison via callbackPhil Carmody-0/+53
2 are provided - with and without a context pointer. Signed-off-by: Phil Carmody <phil@dovecot.fi>
2014-02-04Updated copyright notices to include year 2014.Timo Sirainen-1/+1
2013-02-02Oops :) Update copyrights to 2013 without breaking all .c files.Timo Sirainen-1/+1
2013-02-02Updated copyright notices to include year 2013.Timo Sirainen-1/+1
2012-04-28Code cleanup: Use array_count_i() to calculate array's size internally.Timo Sirainen-3/+3
2012-02-12Updated copyright notices to include year 2012.Timo Sirainen-1/+1
2011-03-04Updated copyright notices to include year 2011.Timo Sirainen-1/+1
2010-01-25Updated copyright notices to include year 2010.Timo Sirainen-1/+1
--HG-- branch : HEAD
2009-07-10Added type safe array_bsearch().Timo Sirainen-0/+10
--HG-- branch : HEAD
2009-06-17Added array_sort() for type-safe array sorting.Timo Sirainen-0/+11
--HG-- branch : HEAD
2009-04-20array_idx_clear() was broken when clearing an index outside the existing array.Timo Sirainen-1/+2
--HG-- branch : HEAD
2009-01-06Updated copyright notices to include year 2009.Timo Sirainen-1/+1
--HG-- branch : HEAD
2008-06-20Added more consts, ATTR_CONSTs and ATTR_PUREs.Timo Sirainen-1/+1
--HG-- branch : HEAD
2008-06-13Added array_reverse().Timo Sirainen-0/+33
--HG-- branch : HEAD
2008-06-13Uninlined some of the more complex array functions.Timo Sirainen-0/+53
--HG-- branch : HEAD