1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Make the pointers of a few static const arrays const, too, for safety.

This commit is contained in:
Dan Fandrich 2007-07-21 02:08:17 +00:00
parent 37dc0fa519
commit b465750041
2 changed files with 4 additions and 4 deletions

View File

@ -705,7 +705,7 @@ static void state(struct connectdata *conn,
{ {
#if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */ /* for debug purposes */
static const char *names[]={ static const char * const names[]={
"STOP", "STOP",
"WAIT220", "WAIT220",
"AUTH", "AUTH",
@ -862,7 +862,7 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
char hbuf[NI_MAXHOST]; char hbuf[NI_MAXHOST];
struct sockaddr *sa=(struct sockaddr *)&ss; struct sockaddr *sa=(struct sockaddr *)&ss;
char tmp[1024]; char tmp[1024];
static const char *mode[] = { "EPRT", "PORT", NULL }; static const char * const mode[] = { "EPRT", "PORT", NULL };
int rc; int rc;
int error; int error;
char *host=NULL; 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; int modeoff;
#ifdef PF_INET6 #ifdef PF_INET6

View File

@ -252,7 +252,7 @@ static void state(struct connectdata *conn, sshstate state)
{ {
#if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS) #if defined(CURLDEBUG) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
/* for debug purposes */ /* for debug purposes */
static const char *names[] = { static const char * const names[] = {
"SSH_STOP", "SSH_STOP",
"SSH_S_STARTUP", "SSH_S_STARTUP",
"SSH_AUTHLIST", "SSH_AUTHLIST",