Lines Matching +full:safer +full:- +full:buffer
1 /* SPDX-License-Identifier: GPL-2.0 */
19 * flex-array.h
23 * Flex-arrays:
24 * - Flex-arrays became standard in C99 and are defined by "array[]" (at the
26 * - Pre-C99 flex-arrays can be accomplished by "array[1]"
27 * - There is a GNU extension where they are defined using "array[0]"
36 * changed from gnu89 to gnu11. In jgmenu, CFLAGS therefore contains -std=gnu89
38 * gcc -dM -E - </dev/null | grep '__STDC_VERSION__\|__STDC__'
40 * The code below is copied from git's git-compat-util.h in support of
56 /* Otherwise, default to safer but a bit wasteful traditional style */
65 (INTMAX_MAX >> (bitsizeof(intmax_t) - bitsizeof(a)))
68 (UINTMAX_MAX >> (bitsizeof(uintmax_t) - bitsizeof(a)))
76 ((b) > maximum_signed_value_of_type(a) - (a))
79 ((b) > maximum_unsigned_value_of_type(a) - (a))
86 return -1; in st_add()
109 * The resulting struct is automatically zero'd, and the flex-array field
110 * is NUL-terminated (whether the incoming src buffer was or not).
112 * The FLEXPTR_* variants operate on structs that don't use flex-arrays,
139 memcpy((void *)(x)->flexname, (buf), flex_array_len_); \
145 (x)->ptrname = (void *)((x) + 1); \