On 01/31/2015 02:49 PM, Andreas Gruenbacher wrote:
+static int
+try_file (char *tmpl, void *flags)
+{
+  return __open (tmpl,
+                (* (int *) flags & ~O_ACCMODE)
+                | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+}

Please avoid the cast by changing the body to look like this:

   int *openflags = flags;
   return __open (tmpl, (*openflags & ~O_ACCMODE) | ...


+       /* Give up now. */

This comment no longer seems to make sense (the loop is now far away) and I'd remove it.

+      errno = EEXIST;

The code previously used __set_errno to set errno; shouldn't it still do that?


Other than that, it looks OK.

Reply via email to