X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=main.cpp;h=c048878cbdc8073a266bed35185fcdbe6db14cba;hp=c208b2d19f381146df11e3322f86a4c34302862a;hb=a0fe013448d188b324c00383cfd91695d9d3d076;hpb=26fe3ab755034ea3be8321ec0af548670f8c3bd8 diff --git a/main.cpp b/main.cpp index c208b2d..c048878 100644 --- a/main.cpp +++ b/main.cpp @@ -36,8 +36,8 @@ using namespace std; -AccessLogThread *access_log = NULL; -ServerPool *servers = NULL; +AccessLogThread *access_log = nullptr; +ServerPool *servers = nullptr; volatile bool hupped = false; volatile bool stopped = false; @@ -116,7 +116,7 @@ vector create_acceptors( { vector acceptors; for (const AcceptorConfig &acceptor_config : config.acceptors) { - Acceptor *acceptor = NULL; + Acceptor *acceptor = nullptr; const auto deserialized_acceptor_it = deserialized_acceptors->find(acceptor_config); if (deserialized_acceptor_it != deserialized_acceptors->end()) { acceptor = deserialized_acceptor_it->second; @@ -152,7 +152,7 @@ void create_config_input(const string &src, Input::Encoding encoding, multimapstop(); input_stats_thread.reset(); } - if (stats_thread != NULL) { + if (stats_thread != nullptr) { stats_thread->stop(); stats_thread.reset(); } @@ -626,7 +626,7 @@ start: sprintf(buf, "%d", state_fd); for ( ;; ) { - execlp(argv0_canon, argv0_canon, config_filename_canon, "--state", buf, NULL); + execlp(argv0_canon, argv0_canon, config_filename_canon, "--state", buf, nullptr); open_logs(config.log_destinations); log_perror("execlp"); log(ERROR, "re-exec of %s failed. Waiting 0.2 seconds and trying again...", argv0_canon);