Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-06-07 Thread Philippe Mathieu-Daudé
On 6/8/20 6:45 AM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> On 2/28/20 6:32 PM, Markus Armbruster wrote: [...] >>> warn_reportf_err() is a convenience function to error_prepend(), >>> warn_report() and free @local_err. > [...] >> Why warn_reportf_err() doesn't take a 'Error

Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-06-07 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: [...] > Why warn_reportf_err() doesn't take a 'Error **err' instead, to set err > to NULL after freeing *err? Why doesn't free() take a void ** argument, to set the pointer to null after freeing what it points to? Why doesn't close() take an int * argument? [...]

Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-06-05 Thread Philippe Mathieu-Daudé
On 2/28/20 6:32 PM, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > >> The error_report API doesn't want trailing newline characters. >> Remove it, to avoid and error when moving the code around: >> >> ERROR: Error messages should not contain newlines > > Commit 312fd5f2909 has a C

Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-02-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The error_report API doesn't want trailing newline characters. > Remove it, to avoid and error when moving the code around: > > ERROR: Error messages should not contain newlines Commit 312fd5f2909 has a Coccinelle script. It should be committed and re-run. >

Re: [PATCH] block: Remove trailing newline in format used by error_report API

2020-02-28 Thread Liam Merwick
On 28/02/2020 12:36, Philippe Mathieu-Daudé wrote: The error_report API doesn't want trailing newline characters. Remove it, to avoid and error when moving the code around: s/and/an/ ERROR: Error messages should not contain newlines Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: L

[PATCH] block: Remove trailing newline in format used by error_report API

2020-02-28 Thread Philippe Mathieu-Daudé
The error_report API doesn't want trailing newline characters. Remove it, to avoid and error when moving the code around: ERROR: Error messages should not contain newlines Signed-off-by: Philippe Mathieu-Daudé --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blo