[PATCH 1/4] windows-nat: Trim a trailing '\n' from OutputDebugString before echoing it
Joel Brobecker
brobecker@adacore.com
Tue Jun 9 18:49:00 GMT 2015
> 2015-06-03 Jon Turney <jon.turney@dronecode.org.uk>
>
> * windows-nat.c (handle_output_debug_string): Trim trailing '\n'
> from OutputDebugString.
Pre-approved with one formatting nit.
> - warning (("%s"), s);
> + {
> + char *p = strchr (s, '\0');
> + if (p > s && *--p == '\n')
> + *p = '\0';
> + warning (("%s"), s);
> + }
Empty line between local variable declarations and the first statement
after that. So empty line after "char *p = [...]".
Thanks,
--
Joel
More information about the Gdb-patches
mailing list