test: add test case for cache and fix some issue

This commit is contained in:
Nick Peng
2023-03-20 23:41:34 +08:00
parent aa6f6fd519
commit bf68385d0e
11 changed files with 405 additions and 47 deletions

View File

@@ -125,10 +125,10 @@ bool Client::Query(const std::string &dig_cmds, int port, const std::string &ip)
cmd += " " + dig_cmds;
cmd += " +tries=1";
FILE *fp = NULL;
FILE *fp = nullptr;
fp = popen(cmd.c_str(), "r");
if (fp == NULL) {
if (fp == nullptr) {
return false;
}