diff options
Diffstat (limited to 'zap/src')
-rw-r--r-- | zap/src/fndbyte.c | 2 | ||||
-rw-r--r-- | zap/src/fndchr.c | 2 | ||||
-rw-r--r-- | zap/src/memcmp.c | 4 | ||||
-rw-r--r-- | zap/src/strcmp.c | 4 | ||||
-rw-r--r-- | zap/src/strdup.c | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/zap/src/fndbyte.c b/zap/src/fndbyte.c index 85fc14d..917aeff 100644 --- a/zap/src/fndbyte.c +++ b/zap/src/fndbyte.c @@ -72,6 +72,6 @@ size_t zap_fndbyte(void const * const _ptr,size_t const _num,uint_least8_t const uint_least8_t const * ptr = (uint_least8_t const *)_ptr; uint_least8_t const * const afterbuf = ptr + _num; for (;ptr != afterbuf;++ptr) {sus_unlikely (*ptr == _byte) {return ptr - (uint_least8_t const *)_ptr;}} - return zap_typlit_usz(-0x1); + return -0x1u; } #endif diff --git a/zap/src/fndchr.c b/zap/src/fndchr.c index cd5458f..6af1b73 100644 --- a/zap/src/fndchr.c +++ b/zap/src/fndchr.c @@ -64,7 +64,7 @@ size_t zap_fndchr(char const * const _str,char const _chr) { for (;;++pos) { char const chr = *pos; sus_unlikely (chr == _chr) {return (size_t)(pos - _str);} - sus_unlikely (chr == '\x0') {return zap_typlit_usz(-0x1);} + sus_unlikely (chr == '\x0') {return -0x1u;} } sus_unreach(); } diff --git a/zap/src/memcmp.c b/zap/src/memcmp.c index 810bab0..31e5161 100644 --- a/zap/src/memcmp.c +++ b/zap/src/memcmp.c @@ -15,7 +15,7 @@ int_least8_t zap_memcmp(void const * const _lstr,size_t const _num,void const * for (;lpos != afterlbuf;++lpos,++rpos) { unsigned char const lbyte = *lpos; unsigned char const rbyte = *rpos; - sus_likely (lbyte != rbyte) {return lbyte < rbyte ? (int_least8_t)INT8_MIN : (int_least8_t)INT8_MAX;} + sus_likely (lbyte != rbyte) {return lbyte < rbyte ? INT8_MIN : INT8_MAX;} } - return zap_typlit_s8(0x0); + return 0x0; } diff --git a/zap/src/strcmp.c b/zap/src/strcmp.c index 9e11601..101f7dc 100644 --- a/zap/src/strcmp.c +++ b/zap/src/strcmp.c @@ -14,8 +14,8 @@ int_least8_t zap_strcmp(char const * const _lstr,char const * const _rstr) { for (;;++lpos,++rpos) { unsigned char const lchr = *lpos; unsigned char const rchr = *rpos; - sus_likely (lchr != rchr) {return lchr < rchr ? (int_least8_t)INT8_MIN : (int_least8_t)INT8_MAX;} - sus_unlikely (lchr == (unsigned char)0x0) {return zap_typlit_s8(0x0);} + sus_likely (lchr != rchr) {return lchr < rchr ? INT8_MIN : INT8_MAX;} + sus_unlikely (lchr == (unsigned char)0x0) {return 0x0;} } sus_unreach(); } diff --git a/zap/src/strdup.c b/zap/src/strdup.c index 785a93b..a7ab6e6 100644 --- a/zap/src/strdup.c +++ b/zap/src/strdup.c @@ -10,7 +10,7 @@ char * zap_strdup(sus_attr_unused char const * const _str) { #if !defined(zap_priv_nostdlib) - return zap_memdup(_str,zap_strlen(_str) + zap_typlit_usz(0x1)); + return zap_memdup(_str,zap_strlen(_str) + 0x1u); #else return NULL; #endif |