X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=udpinput.cpp;fp=udpinput.cpp;h=445d4f551fff145b3ceac1e417b574d4292a1ade;hp=dada7b0a2d6dd7e97e4a1e6385f00d4612fe9fbe;hb=a0fe013448d188b324c00383cfd91695d9d3d076;hpb=26fe3ab755034ea3be8321ec0af548670f8c3bd8 diff --git a/udpinput.cpp b/udpinput.cpp index dada7b0..445d4f5 100644 --- a/udpinput.cpp +++ b/udpinput.cpp @@ -113,12 +113,12 @@ UDPInput::UDPInput(const string &url) 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.connect_time = time(NULL); + stats.connect_time = time(nullptr); stats.latency_sec = HUGE_VAL; } @@ -133,14 +133,14 @@ UDPInput::UDPInput(const InputProto &serialized) 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.connect_time = time(NULL); + stats.connect_time = time(nullptr); } } @@ -206,7 +206,7 @@ void UDPInput::do_work() } // 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;