From: zhanghc Date: Wed, 29 Mar 2006 10:56:02 +0000 (+0000) Subject: b=10329 X-Git-Tag: v1_7_100~510 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=bfcff176c5c529caa395cd4c3ccf38d38ce6d62b;hp=5c83bec51d5849977bd5ccf1f031aea382759a5d;ds=sidebyside b=10329 DESCRIPTION: When doing fcntl() file locking calls in a liblustre client via libsysio, successful lock calls return random non-zero values due to use uninitialized value as return value. --- diff --git a/libsysio/src/fcntl.c b/libsysio/src/fcntl.c index 68ce4de..22e0bcd 100644 --- a/libsysio/src/fcntl.c +++ b/libsysio/src/fcntl.c @@ -259,8 +259,7 @@ _sysio_vfcntl(int fd, int cmd, va_list ap) fl64 = va_arg(ap, struct flock64 *); err = _sysio_fcntl_lock(fil, cmd, fl64); - if (err) - rtn = -1; + rtn = err ? -1 : 0; } break; #endif