Commit 92433e59 authored by Yang Tse's avatar Yang Tse
Browse files

We use this ZERO_NULL to avoid picky compiler warnings,

when assigning a NULL pointer to a function pointer var.
parent 5360f883
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -95,16 +95,16 @@ static CURLcode Curl_dict(struct connectdata *conn, bool *done);

const struct Curl_handler Curl_handler_dict = {
  "DICT",                               /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_dict,                            /* do_it */
  NULL,                                 /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* done */
  ZERO_NULL,                            /* do_more */
  ZERO_NULL,                            /* connect_it */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_DICT,                            /* defport */
  PROT_DICT                             /* protocol */
};
+8 −8
Original line number Diff line number Diff line
@@ -104,16 +104,16 @@ static CURLcode Curl_file_done(struct connectdata *conn,

const struct Curl_handler Curl_handler_file = {
  "FILE",                               /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_file,                            /* do_it */
  Curl_file_done,                       /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* do_more */
  ZERO_NULL,                            /* connect_it */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  0,                                    /* defport */
  PROT_FILE                             /* protocol */
};
+16 −16
Original line number Diff line number Diff line
@@ -207,16 +207,16 @@ const struct Curl_handler Curl_handler_ftps = {

const struct Curl_handler Curl_handler_ftp_proxy = {
  "FTP",                                /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_http,                            /* do_it */
  Curl_http_done,                       /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* do_more */
  ZERO_NULL,                            /* connect_it */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_FTP,                             /* defport */
  PROT_HTTP                             /* protocol */
};
@@ -229,16 +229,16 @@ const struct Curl_handler Curl_handler_ftp_proxy = {

const struct Curl_handler Curl_handler_ftps_proxy = {
  "FTPS",                               /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_http,                            /* do_it */
  Curl_http_done,                       /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* do_more */
  ZERO_NULL,                            /* connect_it */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_FTPS,                            /* defport */
  PROT_HTTP                             /* protocol */
};
+12 −12
Original line number Diff line number Diff line
@@ -121,16 +121,16 @@ static int Curl_https_getsock(struct connectdata *conn,
 */
const struct Curl_handler Curl_handler_http = {
  "HTTP",                               /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_http,                            /* do_it */
  Curl_http_done,                       /* done */
  NULL,                                 /* do_more */
  ZERO_NULL,                            /* do_more */
  Curl_http_connect,                    /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_HTTP,                            /* defport */
  PROT_HTTP,                            /* protocol */
};
@@ -141,16 +141,16 @@ const struct Curl_handler Curl_handler_http = {
 */
const struct Curl_handler Curl_handler_https = {
  "HTTPS",                              /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_http,                            /* do_it */
  Curl_http_done,                       /* done */
  NULL,                                 /* do_more */
  ZERO_NULL,                            /* do_more */
  Curl_http_connect,                    /* connect_it */
  Curl_https_connecting,                /* connecting */
  NULL,                                 /* doing */
  ZERO_NULL,                            /* doing */
  Curl_https_getsock,                   /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_HTTPS,                           /* defport */
  PROT_HTTP | PROT_HTTPS | PROT_SSL     /* protocol */
};
+18 −18
Original line number Diff line number Diff line
@@ -126,16 +126,16 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done);

const struct Curl_handler Curl_handler_ldap = {
  "LDAP",                               /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_ldap,                            /* do_it */
  NULL,                                 /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* done */
  ZERO_NULL,                            /* do_more */
  ZERO_NULL,                            /* connect_it */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_LDAP,                            /* defport */
  PROT_LDAP                             /* protocol */
};
@@ -147,16 +147,16 @@ const struct Curl_handler Curl_handler_ldap = {

const struct Curl_handler Curl_handler_ldaps = {
  "LDAPS",                              /* scheme */
  NULL,                                 /* setup_connection */
  ZERO_NULL,                            /* setup_connection */
  Curl_ldap,                            /* do_it */
  NULL,                                 /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  ZERO_NULL,                            /* done */
  ZERO_NULL,                            /* do_more */
  ZERO_NULL,                            /* connect_it */
  ZERO_NULL,                            /* connecting */
  ZERO_NULL,                            /* doing */
  ZERO_NULL,                            /* proto_getsock */
  ZERO_NULL,                            /* doing_getsock */
  ZERO_NULL,                            /* disconnect */
  PORT_LDAPS,                           /* defport */
  PROT_LDAP | PROT_SSL                  /* protocol */
};
Loading