This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] windows-nat: Trim a trailing '\n' from OutputDebugString before echoing it
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 9 Jun 2015 14:49:14 -0400
- Subject: Re: [PATCH 1/4] windows-nat: Trim a trailing '\n' from OutputDebugString before echoing it
- Authentication-results: sourceware.org; auth=none
- References: <1433352592-9728-1-git-send-email-jon dot turney at dronecode dot org dot uk> <1433352592-9728-2-git-send-email-jon dot turney at dronecode dot org dot uk>
> 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