Simplified NBD handle comparisons

8 bytes, therefore a uing64_t to compare to, no need for memcmp()

Signed-off-by: Michel Pollet <buserror@gmail.com>
This commit is contained in:
Michel Pollet
2016-09-13 21:35:46 +01:00
committed by Patrick J Cherry
parent e3360a3a1b
commit 956a602475
7 changed files with 22 additions and 19 deletions

View File

@@ -57,7 +57,7 @@ void * responder( void *respond_uncast )
fd_write_reply( sock_fd, wrong_handle, 0 );
}
else {
fd_write_reply( sock_fd, resp->received.handle, 0 );
fd_write_reply( sock_fd, (char*)resp->received.handle.b, 0 );
}
write( sock_fd, "12345678", 8 );
}