Re: tb/ban-strtok

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 18, 2023 at 09:58:20AM -0700, Junio C Hamano wrote:
> Taylor Blau <me@xxxxxxxxxxxx> writes:
>
> >>  Mark strtok() and strtok_r() to be banned.
> >>
> >>  source: <cover.1681428696.git.me@xxxxxxxxxxxx>
> >
> > This one needs a reroll to remove `strtok_r()` from the proposed banned
> > list, and to support slightly different semantics the new
> > string_list_split_in_place_multi() function. Will send today.
>
> I actually do not think we would seriously miss strtok_r(); as long
> as the rationale for doing so is clearly described, I think we are
> OK.  Just do not sell string-list as if it were the solution to
> everything (which is not---it is a rather poor data structure), but
> compare string_list_split() with strtok_r() and say our application
> hasn't needed the flexibility of the latter.

I agree that we wouldn't miss it at all, since we have no uses of
strtok_r() today.

But let's decide on banning it separately, since the much more
immediate-term issues are the existing uses of strtok() that are in the
tree.

Thanks,
Taylor



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux