Merge pull request #1575 from hwangcc23/next

Fix warnings
This commit is contained in:
Michael Stapelberg
2015-03-29 16:53:14 +02:00
12 changed files with 90 additions and 80 deletions

View File

@ -296,18 +296,7 @@ int i3_send_msg(uint32_t type, const char *payload) {
if (payload != NULL)
strncpy(walk, payload, len);
uint32_t written = 0;
while (to_write > 0) {
int n = write(i3_connection->fd, buffer + written, to_write);
if (n == -1) {
ELOG("write() failed: %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
to_write -= n;
written += n;
}
swrite(i3_connection->fd, buffer, to_write);
FREE(buffer);