From 185962114a210a92f48191ee52e1d8ba69a2928c Mon Sep 17 00:00:00 2001 From: Alfred Klomp Date: Mon, 14 Jul 2014 22:10:14 +0200 Subject: [PATCH] ssl_test.c: remove dead store, assign at declaration Found with Clang's `scan-build` tool. The store to `ret` is not used, it's overwritten shortly after. Assign the value of 1 at declaration time instead to silence scan-build. --- programs/test/ssl_test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/programs/test/ssl_test.c b/programs/test/ssl_test.c index 3e38e66e5..9e8822433 100644 --- a/programs/test/ssl_test.c +++ b/programs/test/ssl_test.c @@ -145,8 +145,8 @@ int main( int argc, char *argv[] ) */ static int ssl_test( struct options *opt ) { - int ret, i; - int client_fd; + int ret = 1, i; + int client_fd = -1; int bytes_to_read; int bytes_to_write; int offset_to_read = 0; @@ -170,8 +170,6 @@ static int ssl_test( struct options *opt ) x509_cert srvcert; rsa_context rsa; - ret = 1; - memset( &ssl, 0, sizeof(ssl_context) ); entropy_init( &entropy ); memset( &srvcert, 0, sizeof( x509_cert ) );