summaryrefslogtreecommitdiffstats
path: root/XUtils.c
AgeCommit message (Collapse)Author
2020-12-02Add xReadfile wrapper for reading small to medium size filesChristian Göttsche
Inspired by proposed Linux syscall Avoid file descriptor leaks like 4af8c63f
2020-11-02Spacing around operatorsBenny Baumann
2020-10-20IWYU updateChristian Göttsche
- Add Settings forward declaration in Process.h - Add assert.h include in XUitls.c - Add conditional stdbool.h include in Object.h - Drop unneeded stddef.h include in Richstring.c - Drop unneeded unistd.h include in Process.h - Drop unneeded string.h include in linux/Platform.c - Use String_eq to avoid string.h include in Action.c - Improve script to run custom iwyu version
2020-10-19XUtils string related updatesChristian Göttsche
- allow count out-parameter of String_split() to be NULL - introduce xStrndup() - do not allow NULL pointers passed to String_eq() it is not used in any code - implement String_startsWith(), String_contains_i() and String_eq() as inline header functions - adjust several conversion issues
2020-10-19Assert allocating non-zero size memoryChristian Göttsche
Allocating zero size memory results in implementation-defined behavior: man:malloc(3) : If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free().
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-17Release old memory on errorBenny Baumann
Avoids leaking memory upon realloc failure.
2020-10-17Combine XAlloc.[ch] into XUtils.[ch]Benny Baumann
2020-10-16Rename StringUtils.[ch] to XUtils.[ch]Benny Baumann