From 95f559a9266b7df6cb6bb7ac8aced06697f1e8b3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 6 Dec 2009 00:05:30 +0100 Subject: [PATCH] move local variable to be more localized --- src/userauth.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/userauth.c b/src/userauth.c index c401f86..9aed20e 100644 --- a/src/userauth.c +++ b/src/userauth.c @@ -627,8 +627,6 @@ userauth_hostbased_fromfile(LIBSSH2_SESSION *session, const char *local_username, unsigned int local_username_len) { - static const unsigned char reply_codes[3] = - { SSH_MSG_USERAUTH_SUCCESS, SSH_MSG_USERAUTH_FAILURE, 0 }; int rc; if (session->userauth_host_state == libssh2_NB_state_idle) { @@ -824,6 +822,8 @@ userauth_hostbased_fromfile(LIBSSH2_SESSION *session, } if (session->userauth_host_state == libssh2_NB_state_sent) { + static const unsigned char reply_codes[3] = + { SSH_MSG_USERAUTH_SUCCESS, SSH_MSG_USERAUTH_FAILURE, 0 }; unsigned long data_len; rc = _libssh2_packet_requirev(session, reply_codes, &session->userauth_host_data, @@ -1249,8 +1249,9 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session, unsigned char *s; int rc; - static const unsigned char reply_codes[4] = { SSH_MSG_USERAUTH_SUCCESS, - SSH_MSG_USERAUTH_FAILURE, SSH_MSG_USERAUTH_INFO_REQUEST, 0 + static const unsigned char reply_codes[4] = { + SSH_MSG_USERAUTH_SUCCESS, + SSH_MSG_USERAUTH_FAILURE, SSH_MSG_USERAUTH_INFO_REQUEST, 0 }; unsigned int language_tag_len; unsigned int i;