[RFC PATCH 2/6] libutil: Staticize locally used functions

Punit Agrawal <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <[email protected]>
getrealpath and has_symlinkloop are only used locally in this
compilation unit. Make their definitions static to higlight this fact.
---
 libutil/find.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libutil/find.c b/libutil/find.c
index d3c921a..f366004 100644
--- a/libutil/find.c
+++ b/libutil/find.c
@@ -487,7 +487,7 @@ static int current_entry;			/**< current entry of the stack */
 /**
  * getrealpath: return a real path of dir using allocated area.
  */
-char *
+static char *
 getrealpath(const char *dir)
 {
 	char real[PATH_MAX];
@@ -502,7 +502,7 @@ getrealpath(const char *dir)
  *	@param[in]	dir	directory (should end by "/")
  *	@return		1: has a loop, 0: don't have a loop
  */
-int
+static int
 has_symlinkloop(const char *dir)
 {
 	struct stack_entry *sp;
-- 
2.11.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.