add and test ByteLiteral abstraction

This commit is contained in:
auronandace
2026-06-11 17:19:33 +01:00
parent 40767a44fa
commit 2e72022a26
3 changed files with 24 additions and 1 deletions
+2 -1
View File
@@ -6,6 +6,7 @@
//! See <https://github.com/kraj/musl/blob/kraj/master/src/misc/fmtmsg.c>
use crate::{
byte_literal::ByteLiteral,
header::{
fcntl::{O_WRONLY, open},
pthread::{PTHREAD_CANCEL_DISABLE, pthread_setcancelstate},
@@ -77,7 +78,7 @@ unsafe fn strcolcmp(mut lstr: *const c_char, mut bstr: *const c_char) -> c_int {
lstr = lstr.add(1);
bstr = bstr.add(1);
}
if *lstr != 0 || (*bstr != 0 && *bstr != b':'.cast_signed()) {
if *lstr != 0 || (*bstr != 0 && *bstr != ByteLiteral::cast_unchecked(b':')) {
1
} else {
0