mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Changed some arrays of char* to arrays of char[] to reduce data size and
run-time relocations.
This commit is contained in:
parent
4198bb88b6
commit
7fc4e8af0a
@ -880,7 +880,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 * const mode[] = { "EPRT", "PORT", NULL };
|
static const char mode[][5] = { "EPRT", "PORT" };
|
||||||
int rc;
|
int rc;
|
||||||
int error;
|
int error;
|
||||||
char *host=NULL;
|
char *host=NULL;
|
||||||
@ -1266,7 +1266,7 @@ static CURLcode ftp_state_use_pasv(struct connectdata *conn)
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char * const mode[] = { "EPSV", "PASV", NULL };
|
static const char mode[][5] = { "EPSV", "PASV" };
|
||||||
int modeoff;
|
int modeoff;
|
||||||
|
|
||||||
#ifdef PF_INET6
|
#ifdef PF_INET6
|
||||||
@ -2550,9 +2550,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn)
|
|||||||
struct SessionHandle *data=conn->data;
|
struct SessionHandle *data=conn->data;
|
||||||
int ftpcode;
|
int ftpcode;
|
||||||
struct ftp_conn *ftpc = &conn->proto.ftpc;
|
struct ftp_conn *ftpc = &conn->proto.ftpc;
|
||||||
static const char * const ftpauth[] = {
|
static const char ftpauth[][4] = { "SSL", "TLS" };
|
||||||
"SSL", "TLS"
|
|
||||||
};
|
|
||||||
size_t nread = 0;
|
size_t nread = 0;
|
||||||
|
|
||||||
if(ftpc->sendleft) {
|
if(ftpc->sendleft) {
|
||||||
|
@ -96,7 +96,7 @@ const char * const Curl_month[]=
|
|||||||
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
|
||||||
|
|
||||||
struct tzinfo {
|
struct tzinfo {
|
||||||
const char *name;
|
char name[5];
|
||||||
int offset; /* +/- in minutes */
|
int offset; /* +/- in minutes */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -661,7 +661,7 @@ int Curl_read(struct connectdata *conn, /* connection data */
|
|||||||
static int showit(struct SessionHandle *data, curl_infotype type,
|
static int showit(struct SessionHandle *data, curl_infotype type,
|
||||||
char *ptr, size_t size)
|
char *ptr, size_t size)
|
||||||
{
|
{
|
||||||
static const char * const s_infotype[CURLINFO_END] = {
|
static const char s_infotype[CURLINFO_END][3] = {
|
||||||
"* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
|
"* ", "< ", "> ", "{ ", "} ", "{ ", "} " };
|
||||||
|
|
||||||
#ifdef CURL_DOES_CONVERSIONS
|
#ifdef CURL_DOES_CONVERSIONS
|
||||||
|
@ -2469,7 +2469,7 @@ get_pathname(const char **cpp, char **path)
|
|||||||
const char *cp = *cpp, *end;
|
const char *cp = *cpp, *end;
|
||||||
char quot;
|
char quot;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
static const char * const WHITESPACE = " \t\r\n";
|
static const char WHITESPACE[] = " \t\r\n";
|
||||||
|
|
||||||
cp += strspn(cp, WHITESPACE);
|
cp += strspn(cp, WHITESPACE);
|
||||||
if(!*cp) {
|
if(!*cp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user