[Updated] [+ ] D12373: rust-hg-core: use correct type for libc hostname buffer
lukegb (Luke Granger-Brown)
phabricator at mercurial-scm.org
Mon Mar 14 14:20:08 UTC 2022
lukegb updated this revision to Diff 32636.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12373?vs=32635&id=32636
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12373/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12373
AFFECTED FILES
rust/hg-core/src/lock.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/lock.rs b/rust/hg-core/src/lock.rs
--- a/rust/hg-core/src/lock.rs
+++ b/rust/hg-core/src/lock.rs
@@ -145,7 +145,7 @@
/// Same as https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414
const BUFFER_SIZE: usize = 1024;
- let mut buffer = [0_i8; BUFFER_SIZE];
+ let mut buffer = [0 as libc::c_char; BUFFER_SIZE];
let hostname_bytes = unsafe {
let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE);
if result != 0 {
To: lukegb, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220314/d49a5118/attachment-0002.html>
More information about the Mercurial-patches
mailing list