From 0bf92e47799832298bed8c5a111e4c3259944d02 Mon Sep 17 00:00:00 2001 From: resver Date: Tue, 25 Dec 2012 16:55:13 +0000 Subject: [PATCH] Fixed exfat_generic_pwrite(): it should return -1 on error, not -errno. git-svn-id: http://exfat.googlecode.com/svn/trunk@316 60bc1c72-a15a-11de-b98f-4500b42dc123 --- libexfat/io.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libexfat/io.c b/libexfat/io.c index 577238b..32c144c 100644 --- a/libexfat/io.c +++ b/libexfat/io.c @@ -345,11 +345,8 @@ ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node, off_t lsize, loffset, remainder; if (offset + size > node->size) - { - int rc = exfat_truncate(ef, node, offset + size); - if (rc != 0) - return rc; - } + if (exfat_truncate(ef, node, offset + size) != 0) + return -1; if (size == 0) return 0; -- 2.11.0