Skip to content

Commit

Permalink
Make sure function signatures match their declarations in the public …
Browse files Browse the repository at this point in the history
…header
  • Loading branch information
nikias committed May 13, 2023
1 parent ff00100 commit b7d7459
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/jplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,12 @@ static int node_estimate_size(node_t node, uint64_t *size, uint32_t depth, int p
return PLIST_ERR_SUCCESS;
}

int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
plist_err_t plist_to_json(plist_t plist, char **plist_json, uint32_t* length, int prettify)
{
uint64_t size = 0;
int res;

if (!plist || !json || !length) {
if (!plist || !plist_json || !length) {
return PLIST_ERR_INVALID_ARG;
}

Expand All @@ -426,7 +426,7 @@ int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)
res = node_to_json(plist, &outbuf, 0, prettify);
if (res < 0) {
str_buf_free(outbuf);
*json = NULL;
*plist_json = NULL;
*length = 0;
return res;
}
Expand All @@ -436,7 +436,7 @@ int plist_to_json(plist_t plist, char **json, uint32_t* length, int prettify)

str_buf_append(outbuf, "\0", 1);

*json = outbuf->data;
*plist_json = outbuf->data;
*length = outbuf->len - 1;

outbuf->data = NULL;
Expand Down Expand Up @@ -782,7 +782,7 @@ static plist_t parse_object(const char* js, jsmntok_info_t* ti, int* index)
return obj;
}

int plist_from_json(const char *json, uint32_t length, plist_t * plist)
plist_err_t plist_from_json(const char *json, uint32_t length, plist_t * plist)
{
if (!plist) {
return PLIST_ERR_INVALID_ARG;
Expand Down
4 changes: 2 additions & 2 deletions src/oplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static int node_estimate_size(node_t node, uint64_t *size, uint32_t depth, int p
return PLIST_ERR_SUCCESS;
}

int plist_to_openstep(plist_t plist, char **openstep, uint32_t* length, int prettify)
plist_err_t plist_to_openstep(plist_t plist, char **openstep, uint32_t* length, int prettify)
{
uint64_t size = 0;
int res;
Expand Down Expand Up @@ -895,7 +895,7 @@ static int node_from_openstep(parse_ctx ctx, plist_t *plist)
return PLIST_ERR_SUCCESS;
}

int plist_from_openstep(const char *plist_ostep, uint32_t length, plist_t * plist)
plist_err_t plist_from_openstep(const char *plist_ostep, uint32_t length, plist_t * plist)
{
if (!plist) {
return PLIST_ERR_INVALID_ARG;
Expand Down

0 comments on commit b7d7459

Please sign in to comment.