Re: [PATCH 1/3] perf alias: Remove trailing newline when reading sysfs files

Arnaldo Carvalho de Melo
2018-06-14T14:58:33Z

Em Thu, Jun 14, 2018 at 01:48:43PM +0200, Thomas Richter escreveu:
> Remove a trailing newline when reading sysfs file contents
<SNIP>
> + /* Remove trailing newline from sysfs file */
> + cp = strrchr(buf, '\n');
> + if (cp)
> + *cp = '\0';
> +

We have rtrim()

- Arnaldo