summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 8256dcf..4ebaab7 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -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;