Re: Redundant strlen(query) in get_rel_infos

2023-05-15 Thread Daniel Gustafsson
> On 15 May 2023, at 09:45, Michael Paquier wrote: > On Thu, May 11, 2023 at 11:57:37AM +0200, Daniel Gustafsson wrote: >> Looking at the snprintf sites made me remember a patchset I worked on last >> year >> (but I don't remember if I ended up submitting); there is no need to build >> one >> o

Re: Redundant strlen(query) in get_rel_infos

2023-05-15 Thread Michael Paquier
On Thu, May 11, 2023 at 11:57:37AM +0200, Daniel Gustafsson wrote: > I think it's intentionally done in 73b9952e82 as defensive coding, and given > that this is far from a hot codepath I think leaving them is better. > > Instead I think it would be more worthwhile to remove these snprintf() made >

Re: Redundant strlen(query) in get_rel_infos

2023-05-11 Thread Daniel Gustafsson
> On 11 May 2023, at 06:24, Michael Paquier wrote: > > On Thu, May 11, 2023 at 01:06:42PM +1000, Peter Smith wrote: >> While reviewing another patch to the file info.c, I noticed there seem >> to be some unnecessary calls to strlen(query) in get_rel_infos() >> function. >> >> i.e. The query is e

Re: Redundant strlen(query) in get_rel_infos

2023-05-10 Thread Michael Paquier
On Thu, May 11, 2023 at 01:06:42PM +1000, Peter Smith wrote: > While reviewing another patch to the file info.c, I noticed there seem > to be some unnecessary calls to strlen(query) in get_rel_infos() > function. > > i.e. The query is explicitly initialized to an empty string > immediately prior,

Redundant strlen(query) in get_rel_infos

2023-05-10 Thread Peter Smith
Hi. While reviewing another patch to the file info.c, I noticed there seem to be some unnecessary calls to strlen(query) in get_rel_infos() function. i.e. The query is explicitly initialized to an empty string immediately prior, so why the strlen? PSA patch for this. -- Kind Regards, Peter