summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c3
-rw-r--r--html.c6
-rw-r--r--httpd.c3
-rw-r--r--mastoapi.c3
-rw-r--r--utils.c3
5 files changed, 12 insertions, 6 deletions
diff --git a/activitypub.c b/activitypub.c
index f754ee0..1976012 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -1221,7 +1221,8 @@ xs_dict *msg_actor(snac *snac)
1221 xs_str *k; 1221 xs_str *k;
1222 xs_str *v; 1222 xs_str *v;
1223 1223
1224 while (xs_dict_iter(&metadata, &k, &v)) { 1224 int c = 0;
1225 while (xs_dict_next(metadata, &k, &v, &c)) {
1225 xs *d = xs_dict_new(); 1226 xs *d = xs_dict_new();
1226 1227
1227 xs *k2 = encode_html(k); 1228 xs *k2 = encode_html(k);
diff --git a/html.c b/html.c
index d34439a..59fd6c9 100644
--- a/html.c
+++ b/html.c
@@ -779,7 +779,8 @@ static xs_html *html_user_body(snac *user, int read_only)
779 xs_html *snac_metadata = xs_html_tag("div", 779 xs_html *snac_metadata = xs_html_tag("div",
780 xs_html_attr("class", "snac-metadata")); 780 xs_html_attr("class", "snac-metadata"));
781 781
782 while (xs_dict_iter(&metadata, &k, &v)) { 782 int c = 0;
783 while (xs_dict_next(metadata, &k, &v, &c)) {
783 xs_html *value; 784 xs_html *value;
784 785
785 if (xs_startswith(v, "https:/" "/")) { 786 if (xs_startswith(v, "https:/" "/")) {
@@ -944,7 +945,8 @@ xs_html *html_top_controls(snac *snac)
944 xs_str *k; 945 xs_str *k;
945 xs_str *v; 946 xs_str *v;
946 947
947 while (xs_dict_iter(&md, &k, &v)) { 948 int c = 0;
949 while (xs_dict_next(md, &k, &v, &c)) {
948 xs *kp = xs_fmt("%s=%s", k, v); 950 xs *kp = xs_fmt("%s=%s", k, v);
949 951
950 if (*metadata) 952 if (*metadata)
diff --git a/httpd.c b/httpd.c
index 319a7b3..d74642f 100644
--- a/httpd.c
+++ b/httpd.c
@@ -403,7 +403,8 @@ void httpd_connection(FILE *f)
403 xs_dict *more_headers = xs_dict_get(srv_config, "http_headers"); 403 xs_dict *more_headers = xs_dict_get(srv_config, "http_headers");
404 if (xs_type(more_headers) == XSTYPE_DICT) { 404 if (xs_type(more_headers) == XSTYPE_DICT) {
405 char *k, *v; 405 char *k, *v;
406 while (xs_dict_iter(&more_headers, &k, &v)) 406 int c = 0;
407 while (xs_dict_next(more_headers, &k, &v, &c))
407 headers = xs_dict_set(headers, k, v); 408 headers = xs_dict_set(headers, k, v);
408 } 409 }
409 410
diff --git a/mastoapi.c b/mastoapi.c
index 685c644..416f96c 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1172,7 +1172,8 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
1172 if (xs_is_null(val_links)) 1172 if (xs_is_null(val_links))
1173 val_links = xs_stock_dict; 1173 val_links = xs_stock_dict;
1174 1174
1175 while (xs_dict_iter(&metadata, &k, &v)) { 1175 int c = 0;
1176 while (xs_dict_next(metadata, &k, &v, &c)) {
1176 xs *val_date = NULL; 1177 xs *val_date = NULL;
1177 1178
1178 xs_number *verified_time = xs_dict_get(val_links, v); 1179 xs_number *verified_time = xs_dict_get(val_links, v);
diff --git a/utils.c b/utils.c
index d8cebdc..35caa6e 100644
--- a/utils.c
+++ b/utils.c
@@ -423,7 +423,8 @@ void verify_links(snac *user)
423 headers = xs_dict_append(headers, "accept", "text/html"); 423 headers = xs_dict_append(headers, "accept", "text/html");
424 headers = xs_dict_append(headers, "user-agent", USER_AGENT " (link verify)"); 424 headers = xs_dict_append(headers, "user-agent", USER_AGENT " (link verify)");
425 425
426 while (p && xs_dict_iter(&p, &k, &v)) { 426 int c = 0;
427 while (p && xs_dict_next(p, &k, &v, &c)) {
427 /* not an https link? skip */ 428 /* not an https link? skip */
428 if (!xs_startswith(v, "https:/" "/")) 429 if (!xs_startswith(v, "https:/" "/"))
429 continue; 430 continue;