From 9a0c0d8b7462f7a1f0f58052639b3de693775eee Mon Sep 17 00:00:00 2001 From: Alcaro Date: Tue, 17 Feb 2015 00:30:23 +0100 Subject: [PATCH] Fix failed merge --- nbio/nbio_stdio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nbio/nbio_stdio.c b/nbio/nbio_stdio.c index 4ab03be0cb..796dd3f2e0 100644 --- a/nbio/nbio_stdio.c +++ b/nbio/nbio_stdio.c @@ -134,19 +134,19 @@ void* nbio_get_ptr(struct nbio_t* handle, size_t* len) void nbio_cancel(struct nbio_t* handle) { - handle->op = -1; - handle->progress = handle->len; + handle->op = -1; + handle->progress = handle->len; } void nbio_free(struct nbio_t* handle) { + if (!handle) + return; if (handle->op >= 0) { puts("ERROR - attempted free() while busy"); abort(); } - if (!handle) - return; fclose(handle->f); free(handle->data); }