From d154b0f67633db33be2a95b09a1987387ebe6f32 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Thu, 11 Nov 2010 10:42:59 +0300 Subject: [PATCH] exist_file() is inline now. Signed-off-by: Andrew Borodin --- lib/util.c | 8 -------- lib/util.h | 8 ++++++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/util.c b/lib/util.c index 96a3e5c2f..80db1182b 100644 --- a/lib/util.c +++ b/lib/util.c @@ -659,14 +659,6 @@ extension (const char *filename) /* --------------------------------------------------------------------------------------------- */ -int -exist_file (const char *name) -{ - return access (name, R_OK) == 0; -} - -/* --------------------------------------------------------------------------------------------- */ - int check_for_default (const char *default_file, const char *file) { diff --git a/lib/util.h b/lib/util.h index c02345342..b4f5df481 100644 --- a/lib/util.h +++ b/lib/util.h @@ -156,8 +156,6 @@ void init_uid_gid_cache (void); char *get_group (int); char *get_owner (int); -int exist_file (const char *name); - /* Check if the file exists. If not copy the default */ int check_for_default (const char *default_file, const char *file); @@ -224,4 +222,10 @@ char *guess_message_value (void); /*** inline functions **************************************************/ +static inline gboolean +exist_file (const char *name) +{ + return (access (name, R_OK) == 0); +} + #endif /* MC_UTIL_H */