summaryrefslogtreecommitdiff
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
parent632bd4d1f03cd0d4b6bf397b0768063f6713c12d (diff)
downloadopenrc-cf53fe51b1fe109c413777139fabea5934816b6a.tar.gz
openrc-cf53fe51b1fe109c413777139fabea5934816b6a.tar.bz2
openrc-cf53fe51b1fe109c413777139fabea5934816b6a.tar.xz
Don't bother holding the old errno
-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 609447f..5f7e55d 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