From 6f398a8b6eab8d0c61010c144f01d706dc0dad8b Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Sun, 31 May 2015 11:45:03 +1200 Subject: [PATCH] yaffs direct: Fix wrong condition for O_CREAT | O_EXCL Thanks Chris for pointing this out. Signed-off-by: Charles Manning --- direct/yaffsfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direct/yaffsfs.c b/direct/yaffsfs.c index 7afde71..952ffac 100644 --- a/direct/yaffsfs.c +++ b/direct/yaffsfs.c @@ -853,7 +853,7 @@ int yaffs_open_sharing_reldir(struct yaffs_obj *reldir, const YCHAR *path, oflag &= ~(O_EXCL); /* O_TRUNC has no meaning if (O_CREAT | O_EXCL) is specified */ - if ((oflag & O_CREAT) & (oflag & O_EXCL)) + if ((oflag & O_CREAT) && (oflag & O_EXCL)) oflag &= ~(O_TRUNC); /* Todo: Are there any more flag combos to sanitise ? */ -- 2.30.2