util: Make xreadlink a static function.
authorGurucharan Shetty <gshetty@nicira.com>
Thu, 13 Feb 2014 18:21:04 +0000 (10:21 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Thu, 13 Feb 2014 22:09:30 +0000 (14:09 -0800)
It is only used in util.c

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/util.c
lib/util.h

index fc990ef..6490b47 100644 (file)
@@ -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;
index 2e3d1da..c80e8f9 100644 (file)
@@ -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);