hotfix2: assert condition 99/48599/4
authorKrzysztof Dynowski <k.dynowski@samsung.com>
Wed, 23 Sep 2015 08:54:20 +0000 (10:54 +0200)
committerKrzysztof Dynowski <k.dynowski@samsung.com>
Wed, 23 Sep 2015 12:39:31 +0000 (14:39 +0200)
[Feature/Bug]   wrong assert condition
[Cause]         testcase failure
[Solution]      N/A
[Verification]  Build and run tests

Change-Id: I2ad2e674205fbc927cb85251c0cbe037bca039fb

common/utils/fd-utils.cpp

index 08603fa..08c52fe 100644 (file)
@@ -126,7 +126,7 @@ void setFDFlag(const int fd, const int getOp, const int setOp, const int flag, c
 
 int open(const std::string &path, int flags, mode_t mode)
 {
-    assert(!(flags & O_CREAT || flags & O_TMPFILE) || mode != static_cast<unsigned>(-1));
+    assert(!((flags & O_CREAT) == O_CREAT || (flags & O_TMPFILE) == O_TMPFILE) || mode != static_cast<unsigned>(-1));
 
     int fd;