Lines Matching refs:destMax
22 #define SECUREC_MEMSET_PARAM_OK(dest, destMax, count) (SECUREC_LIKELY((destMax) <= SECUREC_MEM_MAX_LEN && \
23 (dest) != NULL && (count) <= (destMax)))
431 SECUREC_INLINE errno_t SecMemsetError(void *dest, size_t destMax, int c)
433 /* Check destMax is 0 compatible with _sp macro */
434 if (destMax == 0 || destMax > SECUREC_MEM_MAX_LEN) {
442 SECUREC_MEMSET_PREVENT_DSE(dest, c, destMax); /* Set entire buffer to value c */
454 * destMax The size of the buffer.
463 * EINVAL dest == NULL and destMax != 0 and destMax <= SECUREC_MEM_MAX_LEN
464 * ERANGE destMax > SECUREC_MEM_MAX_LEN or (destMax is 0 and count > destMax)
465 * ERANGE_AND_RESET count > destMax and destMax != 0 and destMax <= SECUREC_MEM_MAX_LEN and dest != NULL
467 * if return ERANGE_AND_RESET then fill dest to c ,fill length is destMax
469 errno_t memset_s(void *dest, size_t destMax, int c, size_t count)
471 if (SECUREC_MEMSET_PARAM_OK(dest, destMax, count)) {
476 return SecMemsetError(dest, destMax, c);
487 errno_t memset_sOptAsm(void *dest, size_t destMax, int c, size_t count)
489 if (SECUREC_MEMSET_PARAM_OK(dest, destMax, count)) {
494 return SecMemsetError(dest, destMax, c);
498 * Performance optimization, trim judgement on "destMax <= SECUREC_MEM_MAX_LEN"
500 errno_t memset_sOptTc(void *dest, size_t destMax, int c, size_t count)
502 if (SECUREC_LIKELY(count <= destMax && dest != NULL)) {
507 return SecMemsetError(dest, destMax, c);