On Wed, Mar 22, 2023 at 3:35 AM Juergen Gross <jgr...@suse.com> 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 <anthony.per...@citrix.com> > Signed-off-by: Juergen Gross <jgr...@suse.com>
Reviewed-by: Jason Andryuk <jandr...@gmail.com>