This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] windows-nat: Trim a trailing '\n' from OutputDebugString before echoing it


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]