X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=config.cpp;h=55968eed644763d7185be915eb5833cdf4eab03a;hp=0573f5420be84b5cd78c914f63745cb3959062c6;hb=a0fe013448d188b324c00383cfd91695d9d3d076;hpb=26fe3ab755034ea3be8321ec0af548670f8c3bd8 diff --git a/config.cpp b/config.cpp index 0573f54..55968ee 100644 --- a/config.cpp +++ b/config.cpp @@ -89,14 +89,14 @@ bool parse_hostport(const string &hostport, sockaddr_in6 *addr) bool read_config(const string &filename, vector *lines) { FILE *fp = fopen(filename.c_str(), "r"); - if (fp == NULL) { + if (fp == nullptr) { log_perror(filename.c_str()); return false; } char buf[4096]; while (!feof(fp)) { - if (fgets(buf, sizeof(buf), fp) == NULL) { + if (fgets(buf, sizeof(buf), fp) == nullptr) { break; } @@ -181,7 +181,7 @@ bool load_file_to_string(const string &filename, size_t max_size, string *conten contents->clear(); FILE *fp = fopen(filename.c_str(), "r"); - if (fp == NULL) { + if (fp == nullptr) { log_perror(filename.c_str()); return false; }