remove got_path_normalize(); pointless and unused
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/include/got_path.h b/include/got_path.h
index 0930f71..588e227 100644
--- a/include/got_path.h
+++ b/include/got_path.h
@@ -28,12 +28,6 @@ int got_path_is_absolute(const char *);
*/
char *got_path_get_absolute(const char *);
-/*
- * Normalize a path for internal processing.
- * The result is allocated with malloc(3).
- */
-char *got_path_normalize(const char *);
-
/*
* Canonicalize absolute paths by removing redundant path separators
* and resolving references to parent directories ("/../").
diff --git a/lib/path.c b/lib/path.c
index fb283d4..8d2ef33 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -58,24 +58,6 @@ got_path_get_absolute(const char *relpath)
return abspath;
}
-char *
-got_path_normalize(const char *path)
-{
- char *resolved;
-
- resolved = realpath(path, NULL);
- if (resolved == NULL)
- return NULL;
-
- if (!got_path_is_absolute(resolved)) {
- char *abspath = got_path_get_absolute(resolved);
- free(resolved);
- resolved = abspath;
- }
-
- return resolved;
-}
-
/* based on canonpath() from kern_pledge.c */
const struct got_error *
got_canonpath(const char *input, char *buf, size_t bufsize)