diff mbox

[kvm-unit-tests,22/32] lib: add newline to assert_msg

Message ID 20170421005004.137260-23-dmatlack@google.com (mailing list archive)
State New, archived
Headers show

Commit Message

David Matlack April 21, 2017, 12:49 a.m. UTC
From: Peter Feiner <pfeiner@google.com>

Signed-off-by: Peter Feiner <pfeiner@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
---
 lib/libcflat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Jones April 21, 2017, 7:44 a.m. UTC | #1
On Thu, Apr 20, 2017 at 05:49:54PM -0700, David Matlack wrote:
> From: Peter Feiner <pfeiner@google.com>
> 
> Signed-off-by: Peter Feiner <pfeiner@google.com>
> Signed-off-by: David Matlack <dmatlack@google.com>
> ---
>  lib/libcflat.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/libcflat.h b/lib/libcflat.h
> index 05c18543dd72..7e4bce1dd335 100644
> --- a/lib/libcflat.h
> +++ b/lib/libcflat.h
> @@ -130,7 +130,7 @@ do {									\
>  #define assert_msg(cond, fmt, args...)					\
>  do {									\
>  	if (!(cond)) {							\
> -		printf("%s:%d: assert failed: %s: " fmt,		\
> +		printf("%s:%d: assert failed: %s: " fmt "\n",		\
>  		       __FILE__, __LINE__, #cond, ## args);		\
>  		dump_stack();						\
>  		abort();						\
> -- 
> 2.12.2.816.g2cccc81164-goog
>

Should be squashed in with the introduction of assert_msg 

Thanks,
drew
Paolo Bonzini April 21, 2017, 8:25 a.m. UTC | #2
On 21/04/2017 09:44, Andrew Jones wrote:
> On Thu, Apr 20, 2017 at 05:49:54PM -0700, David Matlack wrote:
>> From: Peter Feiner <pfeiner@google.com>
>>
>> Signed-off-by: Peter Feiner <pfeiner@google.com>
>> Signed-off-by: David Matlack <dmatlack@google.com>
>> ---
>>  lib/libcflat.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/libcflat.h b/lib/libcflat.h
>> index 05c18543dd72..7e4bce1dd335 100644
>> --- a/lib/libcflat.h
>> +++ b/lib/libcflat.h
>> @@ -130,7 +130,7 @@ do {									\
>>  #define assert_msg(cond, fmt, args...)					\
>>  do {									\
>>  	if (!(cond)) {							\
>> -		printf("%s:%d: assert failed: %s: " fmt,		\
>> +		printf("%s:%d: assert failed: %s: " fmt "\n",		\
>>  		       __FILE__, __LINE__, #cond, ## args);		\
>>  		dump_stack();						\
>>  		abort();						\
>> -- 
>> 2.12.2.816.g2cccc81164-goog
>>
> 
> Should be squashed in with the introduction of assert_msg 

Indeed, can do when applying too.

Paolo
diff mbox

Patch

diff --git a/lib/libcflat.h b/lib/libcflat.h
index 05c18543dd72..7e4bce1dd335 100644
--- a/lib/libcflat.h
+++ b/lib/libcflat.h
@@ -130,7 +130,7 @@  do {									\
 #define assert_msg(cond, fmt, args...)					\
 do {									\
 	if (!(cond)) {							\
-		printf("%s:%d: assert failed: %s: " fmt,		\
+		printf("%s:%d: assert failed: %s: " fmt "\n",		\
 		       __FILE__, __LINE__, #cond, ## args);		\
 		dump_stack();						\
 		abort();						\