Fix GCC warnings

This commit is contained in:
Bastien Dejean 2019-08-19 16:08:08 +02:00
parent 89d3cd8a0e
commit f0558346b2

View file

@ -128,7 +128,9 @@ int main(int argc, char *argv[])
}
sock_address.sun_family = AF_UNIX;
snprintf(sock_address.sun_path, sizeof(sock_address.sun_path), "%s", socket_path);
if (snprintf(sock_address.sun_path, sizeof(sock_address.sun_path), "%s", socket_path) < 0) {
err("Couldn't write the socket path.\n");
}
sock_fd = socket(AF_UNIX, SOCK_STREAM, 0);