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

From: Arnaldo Carvalho de Melo
Date: Thu Jun 14 2018 - 10:58:34 EST


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