Fixed some Coverity issues

This commit is contained in:
Martin Pulec
2015-10-19 11:31:10 +02:00
parent b8f764e5dd
commit 83c9421b4a
23 changed files with 92 additions and 41 deletions

View File

@@ -309,7 +309,10 @@ static int process_msg(struct control_state *s, fd_t client_fd, char *message, s
new_msg[strlen(message) + 2] = '\0';
}
write_all(cur->fd, new_msg, strlen(new_msg));
int ret = write_all(cur->fd, new_msg, strlen(new_msg));
if (ret != (int) strlen(new_msg)) {
fprintf(stderr, "Cannot write stats!\n");
}
cur = cur->next;
}
free(new_msg);