- if (sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) {
+ r = sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa,
+ offsetof(struct sockaddr_un, sun_path) + strlen(socket_name));
+ if (r < 0) {