[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 2/6] libutil: Staticize locally used functions
From: |
Punit Agrawal |
Subject: |
[RFC PATCH 2/6] libutil: Staticize locally used functions |
Date: |
Mon, 23 Jan 2017 22:43:35 +0000 |
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
- [RFC PATCH 0/6] Enable building Gnu Global package on Hurd, Punit Agrawal, 2017/01/24
- [RFC PATCH 3/6] libutil: Remove usage of PATH_MAX from getrealpath, Punit Agrawal, 2017/01/24
- [RFC PATCH 1/6] libutil: Drop extraneous function declarations, Punit Agrawal, 2017/01/24
- [RFC PATCH 2/6] libutil: Staticize locally used functions,
Punit Agrawal <=
- [RFC PATCH 5/6] libutil: Convert rootdir to a dynamically allocated array, Punit Agrawal, 2017/01/24
- [RFC PATCH 4/6] libutil: Remove usage of PATH_MAX from has_symlinkloop, Punit Agrawal, 2017/01/24
- [RFC PATCH 6/6] libutil: Drop the requirement for PATH_MAX macro, Punit Agrawal, 2017/01/24
- Re: [RFC PATCH 0/6] Enable building Gnu Global package on Hurd, Shigio YAMAGUCHI, 2017/01/25