Fix malloc callbacks for status
FossilOrigin-Name: 3152362dbe0f532a8fcea4e17c1e234e1be9fc6e841d1cc74992094b3de834a2
This commit is contained in:
parent
80c058de65
commit
a381260315
2 changed files with 6 additions and 6 deletions
|
@ -28,17 +28,17 @@ void _mstdnt_val_account_call(cJSON* v, void* _type)
|
|||
{
|
||||
struct mstdnt_account* type = _type;
|
||||
|
||||
mstdnt_account_from_json(type, v);
|
||||
mstdnt_account_from_json(type, v->child);
|
||||
}
|
||||
|
||||
void _mstdnt_val_malloc_account_call(cJSON* v, void* _type)
|
||||
{
|
||||
struct mstdnt_account** type = _type;
|
||||
|
||||
*type = malloc(sizeof(struct mstdnt_account*));
|
||||
*type = malloc(sizeof(struct mstdnt_account));
|
||||
|
||||
if (*type)
|
||||
mstdnt_account_from_json(*type, v);
|
||||
mstdnt_account_from_json(*type, v->child);
|
||||
}
|
||||
|
||||
int mstdnt_account_from_result(struct mstdnt_fetch_results* results,
|
||||
|
|
|
@ -26,7 +26,7 @@ void _mstdnt_val_status_call(cJSON* v, void* _type)
|
|||
{
|
||||
struct mstdnt_status* type = _type;
|
||||
|
||||
mstdnt_status_from_json(type, v);
|
||||
mstdnt_status_from_json(type, v->child);
|
||||
}
|
||||
|
||||
|
||||
|
@ -34,10 +34,10 @@ void _mstdnt_val_malloc_status_call(cJSON* v, void* _type)
|
|||
{
|
||||
struct mstdnt_status** type = _type;
|
||||
|
||||
*type = malloc(sizeof(struct mstdnt_status*));
|
||||
*type = malloc(sizeof(struct mstdnt_status));
|
||||
|
||||
if (*type)
|
||||
mstdnt_status_from_json(*type, v);
|
||||
mstdnt_status_from_json(*type, v->child);
|
||||
}
|
||||
|
||||
int mstdnt_status_from_json(struct mstdnt_status* status, cJSON* js)
|
||||
|
|
Loading…
Reference in a new issue