Skip to content

Commit

Permalink
Change ll_delete() to ll_remove()
Browse files Browse the repository at this point in the history
  • Loading branch information
uoo723 committed Jun 22, 2017
1 parent 6164c31 commit ec4f378
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ typedef struct node {

node_t *ll_create();
int ll_insert(node_t *, unsigned int, char *);
int ll_delete(node_t *, unsigned int);
int ll_remove(node_t *, unsigned int);
node_t *ll_get(node_t *, unsigned int);

#endif
2 changes: 1 addition & 1 deletion src/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int ll_insert(node_t *head, unsigned int key, char *value) {
return 0;
}

int ll_delete(node_t *head, unsigned int key) {
int ll_remove(node_t *head, unsigned int key) {
if (head == NULL) {
return -1;
}
Expand Down
6 changes: 3 additions & 3 deletions test/node_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ int main() {
ll_insert(list, 5, "aa");
print(list);

printf("ll_delete test\n");
ll_delete(list, 6);
ll_delete(list, 4);
printf("ll_remove test\n");
ll_remove(list, 6);
ll_remove(list, 4);
print(list);

printf("ll_get test\n");
Expand Down

0 comments on commit ec4f378

Please sign in to comment.