From 1c82f9e76e1bf9ba626003c6d53371b082f8eb2f Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Thu, 31 Dec 2009 19:47:27 +0000 Subject: [PATCH] add parens to ambiguous if --- src/stasis/io/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stasis/io/file.c b/src/stasis/io/file.c index 25c95ea..61840e2 100644 --- a/src/stasis/io/file.c +++ b/src/stasis/io/file.c @@ -405,7 +405,7 @@ static int file_release_read_buffer(stasis_read_buffer_t * r) { static int file_force(stasis_handle_t * h) { file_impl * impl = h->impl; - if(!impl->file_flags & O_SYNC) { + if(!(impl->file_flags & O_SYNC)) { pthread_mutex_lock(&impl->mut); // must latch because of truncate... :( int fd = impl->fd; pthread_mutex_unlock(&impl->mut); @@ -435,7 +435,7 @@ static int file_force(stasis_handle_t * h) { static int file_force_range(stasis_handle_t *h, lsn_t start, lsn_t stop) { file_impl * impl = h->impl; int ret = 0; - if(!impl->file_flags & O_SYNC) { + if(!(impl->file_flags & O_SYNC)) { // not opened synchronously; we need to explicitly sync. pthread_mutex_lock(&impl->mut); int fd = impl->fd;