Skip to content

Commit

Permalink
fix: add json value tips
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Jun 5, 2024
1 parent 370c793 commit 47db1ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/benchJsonOpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,7 +1391,7 @@ static int getMetaFromCommonJsonFile(tools_cJSON *json) {
tools_cJSON *host = tools_cJSON_GetObjectItem(json, "host");
if (host && host->type == tools_cJSON_String && host->valuestring != NULL) {
if(g_arguments->host && strlen(g_arguments->host) > 0) {
warnPrint("command line already pass host is %s, json config host had been ignored.\n", g_arguments->host);
warnPrint("command line already pass host is %s, json config host(%s) had been ignored.\n", g_arguments->host, host->valuestring);
} else {
g_arguments->host = host->valuestring;
}
Expand All @@ -1400,7 +1400,7 @@ static int getMetaFromCommonJsonFile(tools_cJSON *json) {
tools_cJSON *port = tools_cJSON_GetObjectItem(json, "port");
if (port && port->type == tools_cJSON_Number) {
if(g_arguments->port != DEFAULT_PORT) {
warnPrint("command line already pass port is %d, json config port had been ignored.\n", g_arguments->port);
warnPrint("command line already pass port is %d, json config port(%d) had been ignored.\n", g_arguments->port, (uint16_t)port->valueint);
} else {
g_arguments->port = (uint16_t)port->valueint;
}
Expand Down

0 comments on commit 47db1ed

Please sign in to comment.