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)
|
||||
{
|
||||
struct stat buf;
|
||||
int serrno = errno;
|
||||
|
||||
if (stat (pathname, &buf) == 0)
|
||||
return (true);
|
||||
|
||||
errno = serrno;
|
||||
return (false);
|
||||
return (stat (pathname, &buf) == 0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user