summaryrefslogtreecommitdiffstats
path: root/src/utils.c
AgeCommit message (Collapse)AuthorFilesLines
33 hoursutils: Correct ctype(3) usageGravatar Masatake Daimon1-1/+1
According to POSIX.1 the argument of ctype(3) functions, including toupper(3), has to either be EOF or a value representable as an unsigned char. If the argument has any other value, the behavior is undefined. This means values of signed char must first be cast to unsigned char, otherwise they will be outside the range of allowed values. glibc attempts to avoid the undefined behavior by defining the functions to work for all integer inputs representable by either an unsigned char or a signed char. NetBSD libc does not, and causes a segfault if the value is invalid.
2025-05-17utils: Remove 'plist helper' from header commentGravatar Nikias Bassen1-1/+1
2024-11-28Fix compilation on MSVCGravatar Duncan Ogilvie1-0/+2
2024-01-30Move LIMD_GLUE_API definitions to public headersGravatar Nikias Bassen1-8/+8
2023-04-19Remove plist-related code in favor of new libplist APIGravatar Nikias Bassen1-239/+1
2022-04-22[clang-tidy] Do not use else after return/break/continueGravatar Rosen Penev1-2/+1
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-22[clang-tidy] utils: Fix too small loop variableGravatar Rosen Penev1-1/+1
Found with bugprone-too-small-loop-variable Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-22[clang-tidy] use uppercase numeric literalsGravatar Rosen Penev1-4/+4
Found with readability-uppercase-literal-suffix Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-04-04utils: Close file if buffer allocation fails in buffer_read_from_filename()Gravatar Nikias Bassen1-0/+1
Thanks @demhademha for pointing this out.
2022-02-09utils: Use libplist's plist_from_memory instead of duplicating format detectionGravatar Nikias Bassen1-5/+1
2021-10-19utils: Fix bad malloc result check in buffer_read_from_filename and test ↵Gravatar Nikias Bassen1-1/+5
arguments for NULL
2021-08-30utils: Make MAC_EPOCH define publicGravatar Nikias Bassen1-2/+0
2021-06-21utils: Make sure to add MAC_EPOCH when printing PLIST_DATE nodesGravatar Nikias Bassen1-1/+3
2021-06-21utils: Add plist_print_to_stream_with_indentation()Gravatar Nikias Bassen1-3/+7
2021-06-11utils: Suppress compiler warningGravatar Nikias Bassen1-0/+3
2021-06-07Initial check-in of sourcesGravatar Nikias Bassen1-0/+551