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

Reply via email to