]> git.sesse.net Git - cubemap/blobdiff - config.cpp
Use nullptr instead of NULL everywhere.
[cubemap] / config.cpp
index 0573f5420be84b5cd78c914f63745cb3959062c6..55968eed644763d7185be915eb5833cdf4eab03a 100644 (file)
@@ -89,14 +89,14 @@ bool parse_hostport(const string &hostport, sockaddr_in6 *addr)
 bool read_config(const string &filename, vector<ConfigLine> *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;
        }