diff --git a/src/util.cc b/src/util.cc index 65d06487..acaf1f9f 100644 --- a/src/util.cc +++ b/src/util.cc @@ -737,15 +737,15 @@ char *get_exec_path(int argc, char **const argv, const char *cwd) { if (argv0[0] == '/') { path = static_cast(malloc(len + 1)); - if (path == NULL) { - return NULL; + if (path == nullptr) { + return nullptr; } memcpy(path, argv0, len + 1); } else { auto cwdlen = strlen(cwd); path = static_cast(malloc(len + 1 + cwdlen + 1)); - if (path == NULL) { - return NULL; + if (path == nullptr) { + return nullptr; } memcpy(path, cwd, cwdlen); path[cwdlen] = '/';