summaryrefslogtreecommitdiffstats
path: root/src/util/u_string.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa/util: add missing va_end() after va_copy()Andrii Simiklit2018-09-061-0/+1
| | | | | | | | | | | MSDN: "va_end must be called on each argument list that's initialized with va_start or va_copy before the function returns." Reviewed-by: Eric Engestrom <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107810 Fixes: c6267ebd6c8a "gallium/util: Stop bundling our snprintf implementation." Signed-off-by: Andrii Simiklit <[email protected]>
* mesa/util: don't ignore NULL returned from 'malloc'Andrii Simiklit2018-09-061-1/+1
| | | | | | | | | | We should exit from the function 'util_vasprintf' with error code -1 for case where 'malloc' returns NULL Reviewed-by: Eric Engestrom <[email protected]> Fixes: 864148d69e1e "util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <[email protected]>
* mesa/util: don't use the same 'va_list' instance twiceAndrii Simiklit2018-09-061-1/+1
| | | | | | | | The first usage of the 'va_list' instance could change it. Reviewed-by: Eric Engestrom <[email protected]> Fixes: 864148d69e1e "util: add util_vasprintf() for Windows (v2)" Signed-off-by: Andrii Simiklit <[email protected]>
* util: add util_strdup() wrapper macroBrian Paul2017-10-231-0/+2
| | | | | | To work around MSVC warning that strdup() is a deprecated POSIX function. Reviewed-by: Nicolai Hähnle <[email protected]>
* util: include string.h in u_string.hBrian Paul2017-10-031-0/+1
| | | | | | | To fix MinGW compiler warning about missing strlen() prototype. Not sure how I missed this when fixing the malloc() / stdlib.h issue. Reviewed-by: Charmaine Lee <[email protected]>
* util: include stdlib.h in u_string.h to silence MinGW warningBrian Paul2017-10-031-0/+1
| | | | | | Otherwise we don't get a prototype for malloc(). Reviewed-by: Eric Engestrom <[email protected]>
* util: add util_vasprintf() for Windows (v2)Brian Paul2017-09-281-0/+22
| | | | | | | | We don't have vasprintf() on Windows so we need to implement it ourselves. v2: compute actual length of output string, per Nicolai Hähnle. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: move u_string.h to src/util/u_string.hTimothy Arceri2017-03-121-0/+204
This will help us move u_queue.c here eventually and also provide string function wrappers for anyone wishing to port disk_cache.c to windows. Reviewed-by: Marek Olšák <[email protected]>