X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyaffsfs.c;fp=direct%2Fyaffsfs.c;h=952ffacdbdf259901c5f3608b233210e03bf7bcc;hp=7afde717b97655b253e619bd43014cdb19a5337c;hb=6f398a8b6eab8d0c61010c144f01d706dc0dad8b;hpb=e8bdf6a905e8e37b82fb310306f96ab4de930923 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 ? */