Lines Matching refs:dest
129 #define SECUREC_MEMORY_NO_OVERLAP(dest, src, count) \
130 (((src) < (dest) && ((const char *)(src) + (count)) <= (char *)(dest)) || \
131 ((dest) < (src) && ((char *)(dest) + (count)) <= (const char *)(src)))
133 #define SECUREC_MEMORY_IS_OVERLAP(dest, src, count) \
134 (((src) < (dest) && ((const char *)(src) + (count)) > (char *)(dest)) || \
135 ((dest) < (src) && ((char *)(dest) + (count)) > (const char *)(src)))
141 #define SECUREC_STRING_NO_OVERLAP(dest, src, len) \
142 (((src) < (dest) && ((src) + (len)) < (dest)) || \
143 ((dest) < (src) && ((dest) + (len)) < (src)))
146 * Check whether the strings overlap for strcpy wcscpy function, dest len and src Len are not include terminator
149 #define SECUREC_STRING_IS_OVERLAP(dest, src, len) \
150 (((src) < (dest) && ((src) + (len)) >= (dest)) || \
151 ((dest) < (src) && ((dest) + (len)) >= (src)))
154 * Check whether the strings overlap for strcat wcscat function, dest len and src Len are not include terminator
157 #define SECUREC_CAT_STRING_IS_OVERLAP(dest, destLen, src, srcLen) \
158 (((dest) < (src) && ((dest) + (destLen) + (srcLen)) >= (src)) || \
159 ((src) < (dest) && ((src) + (srcLen)) >= (dest)))
230 #define SECUREC_MEMCPY_WARP_OPT(dest, src, count) (void)SECUREC_MEMCPY_FUNC_OPT((dest), (src), (count))
247 #define SECUREC_MEMORY_BARRIER(dest) __asm__ __volatile__("": : "r"(dest) : "memory")
249 #define SECUREC_MEMORY_BARRIER(dest)
253 #define SECUREC_MEMSET_PREVENT_DSE(dest, value, count) do { \
254 (void)SECUREC_MEMSET_FUNC_OPT(dest, value, count); \
255 SECUREC_MEMORY_BARRIER(dest); \
258 #define SECUREC_MEMSET_PREVENT_DSE(dest, value, count) do { \
260 (void)(*fn_)((dest), (value), (count)); \
263 #define SECUREC_MEMSET_PREVENT_DSE(dest, value, count) (void)SECUREC_MEMSET_FUNC_OPT((dest), (value), (count))
325 #define SECUREC_COPY_VALUE_BY_STRUCT(dest, src, n) do { \
326 *(SecStrBuf##n *)(void *)(dest) = *(const SecStrBuf##n *)(const void *)(src); \
526 #define SECUREC_ERROR_INVALID_RANGE(msg) assert(msg "invalid dest buffer size" == NULL)
531 #define SECUREC_ERROR_INVALID_RANGE(msg) printk("%s invalid dest buffer size\n", msg)
535 #define SECUREC_ERROR_INVALID_RANGE(msg) printf("%s invalid dest buffer size\n", msg)
562 void *memcpy_opt(void *dest, const void *src, size_t n);