clang-tidy nullptr

This commit is contained in:
Erik Frojdh
2020-06-29 17:48:22 +02:00
parent cec26f81e1
commit 5780cabe8d
2 changed files with 20 additions and 20 deletions

View File

@ -25,7 +25,7 @@ int open_socket(int port) {
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = 0;
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
struct addrinfo *res = 0;
struct addrinfo *res = nullptr;
const std::string portname = std::to_string(port);
if (getaddrinfo(host, portname.c_str(), &hints, &res)) {