dir.c: make dir_add_name() and dir_add_ignored() static
These functions are not used by any other file. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Nanako Shiraishi committed
Oct 2, 2008 at 19:14 UTC
159b3212705f0f98c79a5565c0f9eff07234c1c7
2 files changed
+2
-3
dir.c
+2
-2
@@ -382,7 +382,7 @@ static struct dir_entry *dir_entry_new(const char *pathname, int len)
382
return ent;
383
}
384
385
-struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
385
+static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len)
386
{
387
if (cache_name_exists(pathname, len, ignore_case))
388
return NULL;
@@ -391,7 +391,7 @@ struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int
391
return dir->entries[dir->nr++] = dir_entry_new(pathname, len);
392
}
393
394
-struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
394
+static struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
395
{
396
if (cache_name_pos(pathname, len) >= 0)
397
return NULL;
dir.h
-1
@@ -73,7 +73,6 @@ extern void add_excludes_from_file(struct dir_struct *, const char *fname);
73
extern void add_exclude(const char *string, const char *base,
74
int baselen, struct exclude_list *which);
75
extern int file_exists(const char *);
76
-extern struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathname, int len);
76
77
extern char *get_relative_cwd(char *buffer, int size, const char *dir);
78
extern int is_inside_dir(const char *dir);