rename got_object_idset_get_data() to got_object_idset_get()
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 55 56 57 58 59 60
diff --git a/lib/got_lib_object_idset.h b/lib/got_lib_object_idset.h
index 129ff2f..1c726ce 100644
--- a/lib/got_lib_object_idset.h
+++ b/lib/got_lib_object_idset.h
@@ -21,8 +21,7 @@ void got_object_idset_free(struct got_object_idset *);
const struct got_error *got_object_idset_add(void **,
struct got_object_idset *, struct got_object_id *, void *);
-void *got_object_idset_get_data(struct got_object_idset *,
- struct got_object_id *);
+void *got_object_idset_get(struct got_object_idset *, struct got_object_id *);
const struct got_error *got_object_idset_remove(struct got_object_idset *,
struct got_object_id *);
int got_object_idset_contains(struct got_object_idset *,
diff --git a/lib/object_idset.c b/lib/object_idset.c
index 01dbf25..3487cfb 100644
--- a/lib/object_idset.c
+++ b/lib/object_idset.c
@@ -146,8 +146,7 @@ got_object_idset_add(void **existing_data,
}
void *
-got_object_idset_get_data(struct got_object_idset *set,
- struct got_object_id *id)
+got_object_idset_get(struct got_object_idset *set, struct got_object_id *id)
{
struct got_object_idset_element *entry;
uint8_t i = id->sha1[0];
diff --git a/regress/idset/idset_test.c b/regress/idset/idset_test.c
index dceb48a..78476ec 100644
--- a/regress/idset/idset_test.c
+++ b/regress/idset/idset_test.c
@@ -149,15 +149,15 @@ idset_add_remove_iter(void)
if (err)
goto done;
- if (got_object_idset_get_data(set, &id1) != (void *)data1) {
+ if (got_object_idset_get(set, &id1) != (void *)data1) {
err = got_error(GOT_ERR_BAD_OBJ_DATA);
goto done;
}
- if (got_object_idset_get_data(set, &id2) != (void *)data2) {
+ if (got_object_idset_get(set, &id2) != (void *)data2) {
err = got_error(GOT_ERR_BAD_OBJ_DATA);
goto done;
}
- if (got_object_idset_get_data(set, &id3) != (void *)data3) {
+ if (got_object_idset_get(set, &id3) != (void *)data3) {
err = got_error(GOT_ERR_BAD_OBJ_DATA);
goto done;
}
@@ -177,7 +177,7 @@ idset_add_remove_iter(void)
err = got_error(GOT_ERR_BAD_OBJ_DATA);
goto done;
}
- if (got_object_idset_get_data(set, &id2) != NULL) {
+ if (got_object_idset_get(set, &id2) != NULL) {
err = got_error(GOT_ERR_BAD_OBJ_DATA);
goto done;
}