mirror of
https://github.com/lammertb/libhttp.git
synced 2025-09-04 12:42:09 +03:00
main.c: use NULL for pointer
fix for cgcc warning: src/main.c:238:48: warning: Using plain integer as NULL pointer src/main.c:246:44: warning: Using plain integer as NULL pointer src/main.c:418:17: warning: Using plain integer as NULL pointer Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
@@ -235,7 +235,7 @@ static int set_option(char **options, const char *name, const char *value)
|
|||||||
int i, type;
|
int i, type;
|
||||||
const struct mg_option *default_options = mg_get_valid_options();
|
const struct mg_option *default_options = mg_get_valid_options();
|
||||||
|
|
||||||
for (i = 0; main_config_options[i].name != 0; i++) {
|
for (i = 0; main_config_options[i].name != NULL; i++) {
|
||||||
if (0==strcmp(name, main_config_options[i].name)) {
|
if (0==strcmp(name, main_config_options[i].name)) {
|
||||||
/* This option is evaluated by main.c, not civetweb.c - just skip it and return OK */
|
/* This option is evaluated by main.c, not civetweb.c - just skip it and return OK */
|
||||||
return 1;
|
return 1;
|
||||||
@@ -243,7 +243,7 @@ static int set_option(char **options, const char *name, const char *value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
type = CONFIG_TYPE_UNKNOWN;
|
type = CONFIG_TYPE_UNKNOWN;
|
||||||
for (i = 0; default_options[i].name != 0; i++) {
|
for (i = 0; default_options[i].name != NULL; i++) {
|
||||||
if (!strcmp(default_options[i].name, name)) {
|
if (!strcmp(default_options[i].name, name)) {
|
||||||
type = default_options[i].type;
|
type = default_options[i].type;
|
||||||
}
|
}
|
||||||
@@ -415,7 +415,7 @@ static void init_server_name(int argc, const char *argv[])
|
|||||||
server_name = (char*)(argv[i+1]);
|
server_name = (char*)(argv[i+1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
icon_name = 0;
|
icon_name = NULL;
|
||||||
for (i=0; i<argc-1; i++) {
|
for (i=0; i<argc-1; i++) {
|
||||||
if ((argv[i][0]=='-') && (0==strcmp(argv[i]+1, main_config_options[OPTION_ICON].name))) {
|
if ((argv[i][0]=='-') && (0==strcmp(argv[i]+1, main_config_options[OPTION_ICON].name))) {
|
||||||
icon_name = (char*)(argv[i+1]);
|
icon_name = (char*)(argv[i+1]);
|
||||||
|
Reference in New Issue
Block a user