Skip to content

Commit

Permalink
lint latest merges
Browse files Browse the repository at this point in the history
  • Loading branch information
TBSniller committed Oct 2, 2022
1 parent 7d88b10 commit e32bebb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/hyperion_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ int hyperion_client(const char* origin, const char* hostname, int port, bool uni
_registered = false;
sockfd = 0;


if (unix_socket) {
return _connect_unix_socket(hostname);
} else {
Expand Down Expand Up @@ -181,14 +180,14 @@ int _connect_inet_socket(const char* hostname, int port)
timeout.tv_usec = 0;

if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, (char*)&timeout,
sizeof(timeout))
sizeof(timeout))
< 0) {
WARN("setsockopt(SO_SNDTIMEO) failed: %s", strerror(errno));
return 1;
}

if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout,
sizeof(timeout))
sizeof(timeout))
< 0) {
WARN("setsockopt(SO_RCVTIMEO) failed: %s", strerror(errno));
return 1;
Expand Down Expand Up @@ -226,14 +225,15 @@ int _connect_unix_socket(const char* hostname)
timeout.tv_usec = 0;

if (setsockopt(sockfd, SOL_SOCKET, SO_SNDTIMEO, (char*)&timeout,
sizeof(timeout))
sizeof(timeout))
< 0) {
WARN("setsockopt(SO_SNDTIMEO) failed: %s", strerror(errno));
return 1;
}

if (setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (char*)&timeout,
sizeof(timeout)) < 0) {
sizeof(timeout))
< 0) {
WARN("setsockopt(SO_RCVTIMEO) failed: %s", strerror(errno));
return 1;
}
Expand Down
3 changes: 2 additions & 1 deletion src/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ void* connection_loop(void* data)
while (service->connection_loop_running) {
INFO("Connecting hyperion-client..");
if ((hyperion_client("webos", service->settings->address, service->settings->port,
service->settings->unix_socket, service->settings->priority)) != 0) {
service->settings->unix_socket, service->settings->priority))
!= 0) {
ERR("Error! hyperion_client.");
} else {
INFO("hyperion-client connected!");
Expand Down

0 comments on commit e32bebb

Please sign in to comment.