rename got_compare_paths to got_path_cmp
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 47 48 49 50 51 52 53 54
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;
}