aboutsummaryrefslogtreecommitdiff
path: root/seatd
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-30 03:26:52 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-30 03:26:52 +0200
commitc9503ef35df3a5c4a0a34dcb937a84da47ff56ca (patch)
tree523d6495419d97a4f647d36901ec203cf49c70d8 /seatd
parente86c9ec2b722c8b6aef6ea90ecddb57081a1c67f (diff)
seatd: Slight error handling cleanup
Diffstat (limited to 'seatd')
-rw-r--r--seatd/client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/seatd/client.c b/seatd/client.c
index dcb9456..87d6a91 100644
--- a/seatd/client.c
+++ b/seatd/client.c
@@ -112,7 +112,7 @@ static int client_send_error(struct client *client, int error_code) {
};
if (connection_put(&client->connection, &errheader, sizeof errheader) == -1 ||
- connection_put(&client->connection, &errmsg, sizeof errmsg)) {
+ connection_put(&client->connection, &errmsg, sizeof errmsg) == -1) {
log_error("could not send error to client");
return -1;
}
@@ -221,7 +221,7 @@ static int handle_open_device(struct client *client, char *path) {
};
if (connection_put(&client->connection, &header, sizeof header) == -1 ||
- connection_put(&client->connection, &msg, sizeof msg)) {
+ connection_put(&client->connection, &msg, sizeof msg) == -1) {
log_errorf("unable to write response: %s", strerror(errno));
return -1;
}