static int connect_with_timeout(struct lttcomm_sock *sock)
{
- unsigned long timeout = lttcomm_get_network_timeout();
+ const unsigned long timeout = lttcomm_get_network_timeout();
int ret, flags, connect_ret;
struct timespec orig_time, cur_time;
unsigned long diff_ms;
}
new_sock = lttcomm_alloc_sock(sock->proto);
- if (new_sock == NULL) {
+ if (new_sock == nullptr) {
goto error;
}
error:
free(new_sock);
- return NULL;
+ return nullptr;
}
/*