From d8345e96c7b1974eb73f0ac1622c8fc98898efc0 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Fri, 1 Mar 2019 08:08:47 +0800 Subject: [PATCH] Fix typo --- kernel/src/syscall/net.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/src/syscall/net.rs b/kernel/src/syscall/net.rs index 2ff7371..b568fcf 100644 --- a/kernel/src/syscall/net.rs +++ b/kernel/src/syscall/net.rs @@ -125,14 +125,14 @@ pub fn sys_connect(fd: usize, addr: *const u8, addrlen: usize) -> SysResult { let mut socket = proc.sockets.get::(tcp_handle); // TODO selects non-conflict high port - static mut ephermeral_port: u16 = 49152; + static mut EPHEMERAL_PORT: u16 = 49152; let temp_port = unsafe { - if ephermeral_port == 65535 { - ephermeral_port = 49152; + if EPHEMERAL_PORT == 65535 { + EPHEMERAL_PORT = 49152; } else { - ephermeral_port = ephermeral_port + 1; + EPHEMERAL_PORT = EPHEMERAL_PORT + 1; } - ephermeral_port + EPHEMERAL_PORT }; match socket.connect((dest.unwrap(), port), temp_port) {