diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-11-18 01:17:14 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-18 21:14:32 -0800 |
commit | 1f1d1569f4bcd8acbfb80e0bdd11b752cdead637 (patch) | |
tree | 053a5aa02ce092ba957edf8994cd66beb049a774 /libglusterfsclient/src | |
parent | 6b65a11e4e1e351a85cddd86f18b320addec49fb (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-x | libglusterfsclient/src/libglusterfsclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c index 1e50e004e..fb48fc300 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; } |