summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-11-18 01:17:14 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-18 21:14:32 -0800
commit1f1d1569f4bcd8acbfb80e0bdd11b752cdead637 (patch)
tree053a5aa02ce092ba957edf8994cd66beb049a774 /libglusterfsclient/src
parent6b65a11e4e1e351a85cddd86f18b320addec49fb (diff)
libglusterfsclient/ftruncate: add braces to ensure proper evaluation of if conditional.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 369 (Samba does not work with booster.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=369
Diffstat (limited to 'libglusterfsclient/src')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 1e50e004e8f..fb48fc300da 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -5793,8 +5793,8 @@ libgf_client_ftruncate (libglusterfs_client_ctx_t *ctx, fd_t *fd,
int op_ret = -1;
libglusterfs_client_fd_ctx_t *fdctx = NULL;
- if ((!(fd->flags & O_ACCMODE) == O_RDWR)
- && (!((fd->flags & O_ACCMODE) == O_WRONLY))) {
+ if (!(((fd->flags & O_ACCMODE) == O_RDWR)
+ || ((fd->flags & O_ACCMODE) == O_WRONLY))) {
errno = EBADF;
goto out;
}