minor optimize

This commit is contained in:
Nick Peng
2019-08-16 20:13:09 +08:00
parent 6291c17d6a
commit 87f04571b1
14 changed files with 127 additions and 80 deletions

View File

@@ -213,7 +213,7 @@ static int _config_server(int argc, char *argv[], dns_server_type_t type, int de
safe_strncpy(server->hostname, server->server, sizeof(server->hostname));
safe_strncpy(server->httphost, server->server, sizeof(server->httphost));
if (server->path[0] == 0) {
strcpy(server->path, "/");
safe_strncpy(server->path, "/", sizeof(server->path));
}
} else {
/* parse ip, port from ip */