[ovs-dev] [PATCH 1/4] util: Make xreadlink a static function.

Gurucharan Shetty shettyg at nicira.com
Thu Feb 13 19:22:20 UTC 2014


Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 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 fc990ef..6490b47 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 2e3d1da..c80e8f9 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);
-- 
1.7.9.5




More information about the dev mailing list