aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-05 12:00:18 +0000
committerRoy Marples <roy@marples.name>2007-10-05 12:00:18 +0000
commitcf53fe51b1fe109c413777139fabea5934816b6a (patch)
treefb9cfb0b31e7cf6ab3e66fc98645721e1c5af5dd /src
parent632bd4d1f03cd0d4b6bf397b0768063f6713c12d (diff)
Don't bother holding the old errno
Diffstat (limited to 'src')
-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