From 1e779acec75842b0e8d5a34ac2ea52f9caeff4d1 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Tue, 8 Dec 2015 16:28:39 +0530 Subject: api: Fix errno being set to EINVAL even on success BUG: 1289068 Change-Id: I7905ac70a537f23e1844c097a24eaa6cb762fb82 Signed-off-by: Prashanth Pai Reviewed-on: http://review.gluster.org/12909 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: jiffin tony Thottan Reviewed-by: Kaushal M Reviewed-by: Shyamsundar Ranganathan --- api/src/glfs-internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'api') 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) -- cgit