Don't bother holding the old errno
This commit is contained in:
parent
632bd4d1f0
commit
cf53fe51b1
@ -83,13 +83,8 @@ static inline char *rc_xstrdup (const char *str)
|
|||||||
static inline bool rc_exists (const char *pathname)
|
static inline bool rc_exists (const char *pathname)
|
||||||
{
|
{
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
int serrno = errno;
|
|
||||||
|
|
||||||
if (stat (pathname, &buf) == 0)
|
return (stat (pathname, &buf) == 0);
|
||||||
return (true);
|
|
||||||
|
|
||||||
errno = serrno;
|
|
||||||
return (false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user