diff options
Diffstat (limited to 'src/vhost_user/master_req_handler.rs')
-rw-r--r-- | src/vhost_user/master_req_handler.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vhost_user/master_req_handler.rs b/src/vhost_user/master_req_handler.rs index fb33f15..8cba188 100644 --- a/src/vhost_user/master_req_handler.rs +++ b/src/vhost_user/master_req_handler.rs @@ -1,7 +1,6 @@ // Copyright (C) 2019-2021 Alibaba Cloud. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -use libc; use std::mem; use std::os::unix::io::{AsRawFd, RawFd}; use std::os::unix::net::UnixStream; @@ -310,7 +309,7 @@ impl<S: VhostUserMasterReqHandler> MasterReqHandler<S> { _ => { if rfds.is_some() { Endpoint::<SlaveReq>::close_rfds(rfds); - return Err(Error::InvalidMessage); + Err(Error::InvalidMessage) } else { Ok(rfds) } |