]> git.sesse.net Git - cubemap/blobdiff - udpinput.cpp
Use nullptr instead of NULL everywhere.
[cubemap] / udpinput.cpp
index dada7b0a2d6dd7e97e4a1e6385f00d4612fe9fbe..445d4f551fff145b3ceac1e417b574d4292a1ade 100644 (file)
@@ -113,12 +113,12 @@ UDPInput::UDPInput(const string &url)
 
        construct_header();
 
 
        construct_header();
 
-       pthread_mutex_init(&stats_mutex, NULL);
+       pthread_mutex_init(&stats_mutex, nullptr);
        stats.url = url;
        stats.bytes_received = 0;
        stats.data_bytes_received = 0;
        stats.metadata_bytes_received = 0;
        stats.url = url;
        stats.bytes_received = 0;
        stats.data_bytes_received = 0;
        stats.metadata_bytes_received = 0;
-       stats.connect_time = time(NULL);
+       stats.connect_time = time(nullptr);
        stats.latency_sec = HUGE_VAL;
 }
 
        stats.latency_sec = HUGE_VAL;
 }
 
@@ -133,14 +133,14 @@ UDPInput::UDPInput(const InputProto &serialized)
 
        construct_header();
 
 
        construct_header();
 
-       pthread_mutex_init(&stats_mutex, NULL);
+       pthread_mutex_init(&stats_mutex, nullptr);
        stats.url = url;
        stats.bytes_received = serialized.bytes_received();
        stats.data_bytes_received = serialized.data_bytes_received();
        if (serialized.has_connect_time()) {
                stats.connect_time = serialized.connect_time();
        } else {
        stats.url = url;
        stats.bytes_received = serialized.bytes_received();
        stats.data_bytes_received = serialized.data_bytes_received();
        if (serialized.has_connect_time()) {
                stats.connect_time = serialized.connect_time();
        } else {
-               stats.connect_time = time(NULL);
+               stats.connect_time = time(nullptr);
        }
 }
 
        }
 }
 
@@ -206,7 +206,7 @@ void UDPInput::do_work()
                }
 
                // Wait for a packet, or a wakeup.
                }
 
                // Wait for a packet, or a wakeup.
-               bool activity = wait_for_activity(sock, POLLIN, NULL);
+               bool activity = wait_for_activity(sock, POLLIN, nullptr);
                if (!activity) {
                        // Most likely, should_stop was set.
                        continue;
                if (!activity) {
                        // Most likely, should_stop was set.
                        continue;