summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-09-09 00:39:12 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-09 06:38:53 -0700
commit6aff97e9698918af6d5e479b0240610d40cbe344 (patch)
tree2b062382f3dbd07defe97031824551e5d81b33c6 /libglusterfsclient/src
parent19f3591e4ac291d48252849e03afd2ac77205316 (diff)
libglusterfsclient: Fix incorrect NULL check for fd
We should check fdctx instead. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 253 (Global bug for libglusterfsclient NULL checks and CALLOC handling fixes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=253
Diffstat (limited to 'libglusterfsclient/src')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index b5388361711..23379ecff7a 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5605,7 +5605,7 @@ glusterfs_fsync (glusterfs_file_t *fd)
GF_VALIDATE_OR_GOTO (LIBGF_XL_NAME, fd, out);
fdctx = libgf_get_fd_ctx ((fd_t *)fd);
- if (!fd) {
+ if (!fdctx) {
gf_log (LIBGF_XL_NAME, GF_LOG_ERROR, "No fd context present");
errno = EBADF;
goto out;