Skip to content

Commit

Permalink
Fix array.* typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shafreeck committed Aug 23, 2015
1 parent c9c0c23 commit eae46a9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions cetcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cetcd_client *cetcd_client_create(cetcd_array *addresses){
void cetcd_client_destroy(cetcd_client *cli) {
curl_easy_cleanup(cli->curl);
curl_global_cleanup();
cetcd_array_destory(&cli->watchers);
cetcd_array_destroy(&cli->watchers);
}
void cetcd_client_release(cetcd_client *cli){
if (cli) {
Expand Down Expand Up @@ -875,15 +875,15 @@ size_t cetcd_parse_response(char *ptr, size_t size, size_t nmemb, void *userdata
} else {
parser->st = response_discard_st;
yajl_free(parser->json);
cetcd_array_destory(&parser->ctx.keystack);
cetcd_array_destory(&parser->ctx.nodestack);
cetcd_array_destroy(&parser->ctx.keystack);
cetcd_array_destroy(&parser->ctx.nodestack);
}
}
if (parser->st == json_end_st) {
status = yajl_complete_parse(parser->json);
yajl_free(parser->json);
cetcd_array_destory(&parser->ctx.keystack);
cetcd_array_destory(&parser->ctx.nodestack);
cetcd_array_destroy(&parser->ctx.keystack);
cetcd_array_destroy(&parser->ctx.nodestack);
/*parse failed, TODO set error message*/
if (status != yajl_status_ok) {
if (resp->err == NULL) {
Expand Down
4 changes: 2 additions & 2 deletions cetcd_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cetcd_array *cetcd_array_create(size_t cap) {
}
void cetcd_array_release(cetcd_array *ca) {
if (ca) {
cetcd_array_destory(ca);
cetcd_array_destroy(ca);
free(ca);
}
}
Expand Down Expand Up @@ -66,7 +66,7 @@ void *cetcd_array_pop(cetcd_array *ca) {
return e;
}

int cetcd_array_destory(cetcd_array *ca) {
int cetcd_array_destroy(cetcd_array *ca) {
if (ca->elem != NULL && ca->cap != 0) {
free(ca->elem);
ca->elem = NULL;
Expand Down
2 changes: 1 addition & 1 deletion cetcd_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cetcd_array *cetcd_array_create(size_t cap);
void cetcd_array_release();

int cetcd_array_init(cetcd_array *ca, size_t cap);
int cetcd_array_destory(cetcd_array *ca);
int cetcd_array_destroy(cetcd_array *ca);
int cetcd_array_append(cetcd_array *ca, void *p);

void *cetcd_array_get(cetcd_array *ca, size_t index);
Expand Down
2 changes: 1 addition & 1 deletion examples/cetcdget.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
cetcd_response_print(resp);
cetcd_response_release(resp);

cetcd_array_destory(&addrs);
cetcd_array_destroy(&addrs);
cetcd_client_destroy(&cli);
return 0;
}

0 comments on commit eae46a9

Please sign in to comment.