[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] tools/xl: make split_string_into_pair() more usable
- To: Jason Andryuk <jandryuk@xxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Wed, 22 Mar 2023 17:28:54 +0000
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 22 Mar 2023 17:29:21 +0000
- Ironport-data: A9a23:TO3hw6qrt86Xi/MZRJefxxmFTg1eBmIDZRIvgKrLsJaIsI4StFCzt garIBmOaKyCajeheYp+aY7j8B8FvJKEy9ZkT1Bprnw3EnkSopuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WNwUmAWP6gR5weFzSNNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXAG09TRrEtePs+qy2V801gpURE9D0f4xK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xETdxVRrk6VoqwmpXDe1gVr3JDmMcbPe8zMTsJQ9qqdj juepzuhWEBBbrRzzxKU1H/2osnKux+le7sTU5T78+RzrFSckzl75Bo+CgLg/KjRZlSFc9BWL UAO6zcthac3/U2vCNL6WnWQonGeuQUHc8FNCOB84waIooLE7gDcCmUaQzppbN09qNRwVTEsz kWOnd7iGXpoqrL9YW2Z3qeZq3W1Iyd9BWYaaDUNVwct/9jpq4Z1hRXKJuuPC4bs0IezQ2uph WnX8m5n3e57YdM3O7uToGDkiXWep8LzUAMowlzTD1Ca9xw6a9vwD2C30mQ3/cqsPa7AEAbQ5 yZZy5HFhAwdJcrTzXLQGY3hCJnsvq/Ya2OE3DaDCrF7r1yQF2ifkZe8Cd2UDGNgKY46dDDge yc/UisBtcYIbBNGgUKaCr9d6vjGLoC6T7wJrtiOMrJzjmFZLWdrBh1Ga0+KxHzKm0Mxi6w5M przWZ/yUidGU/g2kWftF751PVoX+8zD7TmLGcCTI+qPiNJym0J5uZ9aaQDTP4jVHYuPoRnP8 sY3CvZmPy53CbWkCgGOqNZ7BQlTfRAG6WXe9pU/mhireVE9RgnMypb5nNscRmCSt/8Pz7mVo yvgCx4wJZiWrSSvFDhmo0tLMNvHNauTZ1piVcDwFT5EA0QeXLs=
- Ironport-hdrordr: A9a23:yzE5pKOhqR8HNsBcTtCjsMiBIKoaSvp037BL7S1MoHluGaalfq +V/MjzqiWE6gr5NEtOpTniAsW9qBHnhP1ICOAqVN+ftWLd2VdAQrsN0WLq+UyEJxHD
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, Mar 22, 2023 at 08:29:51AM -0400, Jason Andryuk wrote:
> On Wed, Mar 22, 2023 at 3:35 AM Juergen Gross <jgross@xxxxxxxx> 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.perard@xxxxxxxxxx>
> > Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
>
> Reviewed-by: Jason Andryuk <jandryuk@xxxxxxxxx>
Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Thanks,
--
Anthony PERARD
|