symlinks.c: mark private file-scope symbols as static
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Sep 15, 2012 at 22:38 UTC
72f3196a2db0f58b24acd2f9369c7f97d0d770d5
2 files changed
+5
-4
cache.h
-2
@@ -947,9 +947,7 @@ struct cache_def {
947
extern int has_symlink_leading_path(const char *name, int len);
948
extern int threaded_has_symlink_leading_path(struct cache_def *, const char *, int);
949
extern int check_leading_path(const char *name, int len);
950
-extern int threaded_check_leading_path(struct cache_def *cache, const char *name, int len);
950
extern int has_dirs_only_path(const char *name, int len, int prefix_len);
952
-extern int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len);
951
extern void schedule_dir_for_removal(const char *name, int len);
952
extern void remove_scheduled_dirs(void);
953
symlinks.c
+5
-2
@@ -1,5 +1,8 @@
1
#include "cache.h"
2
3
+static int threaded_check_leading_path(struct cache_def *cache, const char *name, int len);
4
+static int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len);
5
+
6
/*
7
* Returns the length (on a path component basis) of the longest
8
* common prefix match of 'name_a' and 'name_b'.
@@ -231,7 +234,7 @@ int check_leading_path(const char *name, int len)
234
* Return path length if leading path exists and is neither a
235
* directory nor a symlink.
236
*/
234
-int threaded_check_leading_path(struct cache_def *cache, const char *name, int len)
237
+static int threaded_check_leading_path(struct cache_def *cache, const char *name, int len)
238
{
239
int flags;
240
int match_len = lstat_cache_matchlen(cache, name, len, &flags,
@@ -263,7 +266,7 @@ int has_dirs_only_path(const char *name, int len, int prefix_len)
266
* 'prefix_len', thus we then allow for symlinks in the prefix part as
267
* long as those points to real existing directories.
268
*/
266
-int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len)
269
+static int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len)
270
{
271
return lstat_cache(cache, name, len,
272
FL_DIR|FL_FULLPATH, prefix_len) &