From b979af1eeeec77f7329c6e9daf801b5339069eeb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 28 Apr 2010 00:31:46 +0200 Subject: [PATCH] sftp_readdir: turn a small array static const and move it --- src/sftp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sftp.c b/src/sftp.c index f0c8f6f9..db0615c2 100644 --- a/src/sftp.c +++ b/src/sftp.c @@ -1190,7 +1190,8 @@ static int sftp_readdir(LIBSSH2_SFTP_HANDLE *handle, char *buffer, /* 13 = packet_len(4) + packet_type(1) + request_id(4) + handle_len(4) */ ssize_t packet_len = handle->handle_len + 13; unsigned char *s, *data; - unsigned char read_responses[2] = { SSH_FXP_NAME, SSH_FXP_STATUS }; + static const unsigned char read_responses[2] = { + SSH_FXP_NAME, SSH_FXP_STATUS }; int retcode; if (sftp->readdir_state == libssh2_NB_state_idle) {