ini_file_reader.c: fix empty string compare

pull/37/head
YuQing 2019-09-22 10:23:36 +08:00
parent c1f0d855c8
commit 93ca7b42cd
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,9 @@
Version 1.41 2019-09-22
* change CIDR network_bits range from [16, 32) to [10, 32)
* ini_file_reader.c: fix empty string compare
Version 1.40 2018-11-09 Version 1.40 2018-11-09
* add function conn_pool_parse_server_info and conn_pool_load_server_info * add function conn_pool_parse_server_info and conn_pool_load_server_info
* support directive: #@add_annotation, for example: * support directive: #@add_annotation, for example:

View File

@ -851,14 +851,14 @@ static int iniAddAnnotation(char *params)
func_name = fc_trim(cols[0]); func_name = fc_trim(cols[0]);
library = fc_trim(cols[1]); library = fc_trim(cols[1]);
if (func_name == '\0') if (*func_name == '\0')
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"empty func name, correct format: " "empty func name, correct format: "
"#@add_annotation FUNC_NAME library ...", __LINE__); "#@add_annotation FUNC_NAME library ...", __LINE__);
return EINVAL; return EINVAL;
} }
if (library == '\0') if (*library == '\0')
{ {
logError("file: "__FILE__", line: %d, " logError("file: "__FILE__", line: %d, "
"empty library, correct format: " "empty library, correct format: "