aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rc-misc.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/rc-misc.h b/src/rc-misc.h
index 609447f7..5f7e55dd 100644
--- a/src/rc-misc.h
+++ b/src/rc-misc.h
@@ -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