From ac01d085e1046835594f806dd94d7b0708972ff7 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Thu, 13 Feb 2014 10:21:04 -0800 Subject: [PATCH] util: Make xreadlink a static function. It is only used in util.c Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- lib/util.c | 4 +++- lib/util.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/util.c b/lib/util.c index fc990efb4..6490b4783 100644 --- a/lib/util.c +++ b/lib/util.c @@ -55,6 +55,8 @@ DEFINE_STATIC_PER_THREAD_DATA(struct { char s[128]; }, strerror_buffer, { "" }); +static char *xreadlink(const char *filename); + void ovs_assert_failure(const char *where, const char *function, const char *condition) @@ -745,7 +747,7 @@ abs_file_name(const char *dir, const char *file_name) /* Like readlink(), but returns the link name as a null-terminated string in * allocated memory that the caller must eventually free (with free()). * Returns NULL on error, in which case errno is set appropriately. */ -char * +static char * xreadlink(const char *filename) { size_t size; diff --git a/lib/util.h b/lib/util.h index 2e3d1dac7..c80e8f987 100644 --- a/lib/util.h +++ b/lib/util.h @@ -310,7 +310,6 @@ char *dir_name(const char *file_name); char *base_name(const char *file_name); char *abs_file_name(const char *dir, const char *file_name); -char *xreadlink(const char *filename); char *follow_symlinks(const char *filename); void ignore(bool x OVS_UNUSED); -- 2.43.0