From: Toon Claes Date: Fri, 20 Feb 2026 15:36:58 GMT Subject: Re: [PATCH v7 5/6] refs: allow reference location in refstorage config Message-ID: <87342vfmud.fsf@iotcl.com> In-Reply-To: <20260219-kn-alternate-ref-dir-v7-5-16f27860dbdf@gmail.com> Karthik Nayak writes: > diff --git a/setup.c b/setup.c > index 1fc9ae3872..d407f3347b 100644 > --- a/setup.c > +++ b/setup.c > @@ -632,6 +632,21 @@ static enum extension_result handle_extension_v0(const char *var, > return EXTENSION_UNKNOWN; > } > > +static void parse_reference_uri(const char *value, char **format, > + char **payload) > +{ > + const char *schema_end; > + > + schema_end = strstr(value, "://"); > + if (!schema_end) { > + *format = xstrdup(value); > + *payload = NULL; > + } else { > + *format = xstrndup(value, schema_end - value); > + *payload = xstrdup_or_null(schema_end + 3); Also here, why did you put the negated condition in the if clause? > + } > +} > + -- Cheers, Toon