On Wed, Mar 22, 2023 at 08:29:51AM -0400, Jason Andryuk wrote: > On Wed, Mar 22, 2023 at 3:35 AM Juergen Gross <[email protected]> wrote: > > > > Today split_string_into_pair() will not really do what its name is > > suggesting: instead of splitting a string into a pair of strings using > > a delimiter, it will return the first two strings of the initial string > > by using the delimiter. > > > > This is never what the callers want, so modify split_string_into_pair() > > to split the string only at the first delimiter found, resulting in > > something like "x=a=b" to be split into "x" and "a=b" when being called > > with "=" as the delimiter. Today the returned strings would be "x" and > > "a". > > > > At the same time switch the delimiter from "const char *" (allowing > > multiple delimiter characters) to "char" (a single character only), as > > this makes the function more simple without breaking any use cases. > > > > Suggested-by: Anthony PERARD <[email protected]> > > Signed-off-by: Juergen Gross <[email protected]> > > Reviewed-by: Jason Andryuk <[email protected]>
Acked-by: Anthony PERARD <[email protected]> Thanks, -- Anthony PERARD
