Use Cell representation for errno
This commit is contained in:
committed by
Jeremy Soller
parent
9ef3374c30
commit
9093f6bc47
@@ -886,7 +886,7 @@ unsafe fn inner_printf<W: Write>(w: W, format: *const c_char, mut ap: VaList) ->
|
||||
let c = match char::from_u32(*ptr as _) {
|
||||
Some(c) => c,
|
||||
None => {
|
||||
platform::errno = EILSEQ;
|
||||
platform::errno.set(EILSEQ);
|
||||
return Err(io::last_os_error());
|
||||
}
|
||||
};
|
||||
@@ -922,7 +922,7 @@ unsafe fn inner_printf<W: Write>(w: W, format: *const c_char, mut ap: VaList) ->
|
||||
let c = match char::from_u32(c as _) {
|
||||
Some(c) => c,
|
||||
None => {
|
||||
platform::errno = EILSEQ;
|
||||
platform::errno.set(EILSEQ);
|
||||
return Err(io::last_os_error());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user