diff options
author | default <nobody@localhost> | 2023-08-05 14:56:07 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-08-05 14:56:07 +0200 |
commit | 15f755960b0b870f5d35105393c65c16d5633e58 (patch) | |
tree | 23b11455ce6e75b347052c698183194f4ccfa4de /mastoapi.c | |
parent | 381a2f5b7bf5f5952f715e40834bb3b50dcb4032 (diff) |
Added xs_json_load() wherever possible.
Diffstat (limited to 'mastoapi.c')
-rw-r--r-- | mastoapi.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -66,10 +66,9 @@ xs_dict *app_get(const char *id) FILE *f; if ((f = fopen(fn, "r")) != NULL) { - xs *j = xs_readall(f); + app = xs_json_load(f); fclose(f); - app = xs_json_loads(j); } return app; @@ -124,10 +123,8 @@ xs_dict *token_get(const char *id) FILE *f; if ((f = fopen(fn, "r")) != NULL) { - xs *j = xs_readall(f); + token = xs_json_load(f); fclose(f); - - token = xs_json_loads(j); } return token; |