Commit 1beed9999fbf48508ec7047066ffd0c856eb9a28

Stefan Sperling 2019-01-12T21:06:50

rename got_compare_paths to got_path_cmp

diff --git a/lib/got_lib_path.h b/lib/got_lib_path.h
index a4f547b..ba75800 100644
--- a/lib/got_lib_path.h
+++ b/lib/got_lib_path.h
@@ -59,4 +59,4 @@ int got_path_is_child(const char *, const char *, size_t);
  * Like strcmp() but orders children in subdirectories directly after
  * their parents.
  */
-int got_compare_paths(const char *, const char *);
+int got_path_cmp(const char *, const char *);
diff --git a/lib/path.c b/lib/path.c
index ee46c55..89daf6b 100644
--- a/lib/path.c
+++ b/lib/path.c
@@ -159,7 +159,7 @@ got_path_is_child(const char *child, const char *parent, size_t parent_len)
 }
 
 int
-got_compare_paths(const char *path1, const char *path2)
+got_path_cmp(const char *path1, const char *path2)
 {
 	size_t len1 = strlen(path1);
 	size_t len2 = strlen(path2);
diff --git a/regress/path/path_test.c b/regress/path/path_test.c
index c833383..009715a 100644
--- a/regress/path/path_test.c
+++ b/regress/path/path_test.c
@@ -44,7 +44,7 @@ test_printf(char *fmt, ...)
 }
 
 static int
-path_compare(void)
+path_cmp(void)
 {
 	struct path_cmp_test {
 		const char *path1;
@@ -76,7 +76,7 @@ path_compare(void)
 		const char *path1 = test_data[i].path1;
 		const char *path2 = test_data[i].path2;
 		int expected = test_data[i].expected;
-		int cmp = got_compare_paths(path1, path2);
+		int cmp = got_path_cmp(path1, path2);
 
 		if (cmp != expected) {
 			test_printf("%d: '%s' vs '%s' == %d; expected %d\n",
@@ -123,7 +123,7 @@ main(int argc, char *argv[])
 	argc -= optind;
 	argv += optind;
 
-	RUN_TEST(path_compare(), "path_compare");
+	RUN_TEST(path_cmp(), "path_cmp");
 
 	return failure ? 1 : 0;
 }