From 2f24d02a8f2fef277664407164d78c9740bc7a07 Mon Sep 17 00:00:00 2001 From: Alex Young Date: Fri, 13 Jul 2012 09:34:18 +0100 Subject: [PATCH] Remove unused variables use_connect_from in control_mirror() and success in mode_serve() are no longer used. --- src/control.c | 2 -- src/mode.c | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/control.c b/src/control.c index 6607502..dd93205 100644 --- a/src/control.c +++ b/src/control.c @@ -256,7 +256,6 @@ int control_mirror(struct control_client* client, int linesc, char** lines) struct flexnbd * flexnbd = client->flexnbd; union mysockaddr *connect_to = xmalloc( sizeof( union mysockaddr ) ); union mysockaddr *connect_from = NULL; - int use_connect_from = 0; uint64_t max_Bps = 0; int action_at_finish; int raw_port; @@ -285,7 +284,6 @@ int control_mirror(struct control_client* client, int linesc, char** lines) write_socket("1: bad bind address"); return -1; } - use_connect_from = 1; } if (linesc > 3) { max_Bps = atoi(lines[2]); } diff --git a/src/mode.c b/src/mode.c index 210854d..41d1edf 100644 --- a/src/mode.c +++ b/src/mode.c @@ -370,8 +370,6 @@ int mode_serve( int argc, char *argv[] ) int default_deny = 0; // not on by default int err = 0; - int success; - struct flexnbd * flexnbd; while (1) { @@ -392,7 +390,7 @@ int mode_serve( int argc, char *argv[] ) if ( err ) { exit_err( serve_help_text ); } flexnbd = flexnbd_create_serving( ip_addr, ip_port, file, sock, default_deny, argc - optind, argv + optind, MAX_NBD_CLIENTS ); - success = flexnbd_serve( flexnbd ); + flexnbd_serve( flexnbd ); flexnbd_destroy( flexnbd ); return 0;