Re: [hackers] [surf][PATCH] Don't call setstyle with an empty path

From: <fossy_AT_dnmx.org>
Date: Wed, 4 May 2022 16:21:29 -0400

Yeah.. I didn't think about the 2nd mention of the variable `file` haha
too tired..

> On 04/05/2022 00:18, Nick Hanley wrote:
> > On Tue, May 03, 2022 at 02:45:05PM -0400, fossy_AT_dnmx.org wrote:
> >> Just wondering - why not just do
> >> if (*getstyle(geturi(c)))
> >> setstyle(c, file);
> >
> > We need to pass the file path returned by getstyle to setstyle.
>
> An alternative would be to keep the original nested invocation and add a
> NULL check inside setstyle(). This would avoid adding an extra variable
> 'file'.
>
> my 2 cents
>
> Cheers,
>
> --
> Antonio Quartulli
Received on Wed May 04 2022 - 22:21:29 CEST

This archive was generated by hypermail 2.3.0 : Wed May 04 2022 - 22:24:33 CEST