summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2015-12-08 16:28:39 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2016-01-05 07:41:10 -0800
commit1e779acec75842b0e8d5a34ac2ea52f9caeff4d1 (patch)
tree89393458ed966f2c3d03c288abdccc05ef20ee85 /api/src
parent45b1bf53da028b92ea7fc3f21a53f2a3cb0d8b0c (diff)
api: Fix errno being set to EINVAL even on success
BUG: 1289068 Change-Id: I7905ac70a537f23e1844c097a24eaa6cb762fb82 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/12909 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'api/src')
-rw-r--r--api/src/glfs-internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h
index 2702505f765..ab08cb5cfc3 100644
--- a/api/src/glfs-internal.h
+++ b/api/src/glfs-internal.h
@@ -119,6 +119,8 @@
if (ret < 0) { \
errno = -ret; \
ret = -1; \
+ } else { \
+ errno = 0; \
} \
} while (0)