Karthik Nayak [off-list ref] writes:
quoted hunk ↗ jump to hunk
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