From f95b0dc37fc6e0d36b0e910c869e0a04714439c4 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Sun, 12 Jul 2009 15:07:45 -0300
Subject: [PATCH 20/74] jtrans_add(): Fix error return value for 0 length operations

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
---
 libjio/trans.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libjio/trans.c b/libjio/trans.c
index e738eb5..6a49c0d 100644
--- a/libjio/trans.c
+++ b/libjio/trans.c
@@ -119,7 +119,7 @@ int jtrans_add(struct jtrans *ts, const void *buf, size_t count, off_t offset)
 	/* fail for 0 length operations */
 	if (count == 0) {
 		pthread_mutex_unlock(&(ts->lock));
-		return 1;
+		return -1;
 	}
 
 	if ((long long) ts->len + count > MAX_TSIZE) {
-- 
1.6.2.2.646.gb214

