diff options
author | relan <relan@users.noreply.github.com> | 2012-12-25 16:55:13 +0000 |
---|---|---|
committer | relan <relan@users.noreply.github.com> | 2015-08-24 08:26:15 +0300 |
commit | 73160fd42a0c979e430515b3a92f465a274a6237 (patch) | |
tree | b28ba84f86bd6cdad0ce41f7e0baf27fac130c63 /libexfat/io.c | |
parent | 54cc3122fe9aa42e883fa4425d396a3519848083 (diff) | |
download | android_external_exfat-73160fd42a0c979e430515b3a92f465a274a6237.tar.gz android_external_exfat-73160fd42a0c979e430515b3a92f465a274a6237.tar.bz2 android_external_exfat-73160fd42a0c979e430515b3a92f465a274a6237.zip |
Fix exfat_generic_pwrite().
It should return -1 on error, not -errno.
Diffstat (limited to 'libexfat/io.c')
-rw-r--r-- | libexfat/io.c | 7 |
1 files 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; |