From: Dan Fandrich Date: Sat, 21 Jul 2007 02:08:17 +0000 (+0000) Subject: Make the pointers of a few static const arrays const, too, for safety. X-Git-Tag: curl-7_17_0-preldapfix~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b465750041fc82c2633bdc5ea65de0ceda6a88b8;p=curl Make the pointers of a few static const arrays const, too, for safety. --- diff --git a/lib/ftp.c b/lib/ftp.c index a8a1e6644..69e76a624 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -705,7 +705,7 @@ static void state(struct connectdata *conn, { #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) /* for debug purposes */ - static const char *names[]={ + static const char * const names[]={ "STOP", "WAIT220", "AUTH", @@ -862,7 +862,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn, char hbuf[NI_MAXHOST]; struct sockaddr *sa=(struct sockaddr *)&ss; char tmp[1024]; - static const char *mode[] = { "EPRT", "PORT", NULL }; + static const char * const mode[] = { "EPRT", "PORT", NULL }; int rc; int error; char *host=NULL; @@ -1246,7 +1246,7 @@ static CURLcode ftp_state_use_pasv(struct connectdata *conn) */ - static const char *mode[] = { "EPSV", "PASV", NULL }; + static const char * const mode[] = { "EPSV", "PASV", NULL }; int modeoff; #ifdef PF_INET6 diff --git a/lib/ssh.c b/lib/ssh.c index b38656619..58d7c6963 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -252,7 +252,7 @@ static void state(struct connectdata *conn, sshstate state) { #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) /* for debug purposes */ - static const char *names[] = { + static const char * const names[] = { "SSH_STOP", "SSH_S_STARTUP", "SSH_AUTHLIST",