From: Christian Couder Date: Mon, 27 Apr 2026 12:42:10 GMT Subject: Re: [PATCH 03/16] urlmatch: add url_is_valid_pattern() helper Message-ID: In-Reply-To: On Thu, Mar 26, 2026 at 1:20 PM Patrick Steinhardt wrote: > > On Mon, Mar 23, 2026 at 09:05:06AM +0100, Christian Couder wrote: > > +bool url_is_valid_pattern(const char *url) > > +{ > > + char *normalized = url_normalize_1(url, NULL, true); > > + > > + if (normalized) { > > + free(normalized); > > + return true; > > + } > > + > > + return false; > > +} > > We could simplify this implementation to: > > bool url_is_valid_pattern(const char *url) > { > char *normalized = url_normalize_1(url, NULL, true); > free(normalized); > return !!normalized; > } Thanks for the suggestion but this patch has been replaced by a patch adding url_normalize_pattern() in the v2 I just sent.