From cf53fe51b1fe109c413777139fabea5934816b6a Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 5 Oct 2007 12:00:18 +0000 Subject: Don't bother holding the old errno --- src/rc-misc.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3