bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tempname: new try_tempname function


From: Paul Eggert
Subject: Re: [PATCH] tempname: new try_tempname function
Date: Mon, 02 Feb 2015 17:11:02 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Andreas Grünbacher wrote:
+  if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
+    {
+      if (errno == ENOENT)
+       return 0;
+    }
+  else
+    __set_errno (EEXIST);
+  return -1;

Thanks, one further suggestion.  The above can be simplified to:

  if (__lxstat64 (_STAT_VER, tmpl, &st) == 0)
    __set_errno (EEXIST);
  return errno == ENOENT ? 0 : -1;

Other than that it looks good, and please install.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]