Skip to content

Commit 37d07e4

Browse files
authored
hostid: simplify the code (#11502)
1 parent 8952452 commit 37d07e4

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/uu/hostid/src/hostid.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
2121
* is a no-op unless unsigned int is wider than 32 bits.
2222
*/
2323

24-
let mut result: c_long;
25-
unsafe {
26-
result = gethostid();
27-
}
24+
let mut result: c_long = unsafe { gethostid() };
2825

2926
#[allow(overflowing_literals)]
3027
let mask = 0xffff_ffff;

0 commit comments

Comments
 (0)