aboutsummaryrefslogtreecommitdiff
path: root/iri.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-09-24 08:12:40 +0000
committerOmar Polo <op@omarpolo.com>2021-09-24 08:12:40 +0000
commite15fc9573666054bdff5feecf8b2b130ca00cc76 (patch)
tree090cebe98470500ae418311523b9a77e8deac88b /iri.c
parent81e0f0007842bc82fe234ffe4e5e0ce362b3a280 (diff)
change struct initialization
makes more explicit which fields we're setting. (and kill an extra empty line)
Diffstat (limited to 'iri.c')
-rw-r--r--iri.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/iri.c b/iri.c
index e00a500..1282be8 100644
--- a/iri.c
+++ b/iri.c
@@ -390,7 +390,11 @@ int
parse_iri(char *iri, struct iri *ret, const char **err_ret)
{
char *end;
- struct parser p = {iri, ret, NULL};
+ struct parser p = {
+ .iri = iri,
+ .parsed = ret,
+ .err = NULL,
+ };
memset(ret, 0, sizeof(*ret));
@@ -424,7 +428,6 @@ trim_req_iri(char *iri, const char **err)
return 1;
}
-
int
serialize_iri(struct iri *i, char *buf, size_t len)
{