Skip to content

Commit

Permalink
revert last PR
Browse files Browse the repository at this point in the history
  • Loading branch information
cylgom committed Dec 14, 2019
1 parent 2312da1 commit 7b85905
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/memstream.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
Expand All @@ -14,7 +13,7 @@ void memstream_init(struct memstream* s, int fd, void* buffer, size_t len)

void memstream_flush(struct memstream* s)
{
assert(write(s->file, s->data, s->pos) == s->pos);
write(s->file, s->data, s->pos);
s->pos = 0;
}

Expand Down
4 changes: 2 additions & 2 deletions src/termbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ static void sigwinch_handler(int xxx)
{
(void) xxx;
const int zzz = 1;
assert(write(winch_fds[1], &zzz, sizeof(int)) == sizeof(int));
write(winch_fds[1], &zzz, sizeof(int));
}

static void update_size(void)
Expand Down Expand Up @@ -876,7 +876,7 @@ static int wait_fill_event(struct tb_event* event, struct timeval* timeout)
{
event->type = TB_EVENT_RESIZE;
int zzz = 0;
assert(read(winch_fds[0], &zzz, sizeof(int)) == sizeof(int));
read(winch_fds[0], &zzz, sizeof(int));
buffer_size_change_request = 1;
get_term_size(&event->w, &event->h);
return TB_EVENT_RESIZE;
Expand Down

0 comments on commit 7b85905

Please sign in to comment.