diff mbox series

sctp: insert a space to isolate two word

Message ID 20180604032628.2737-1-sunlw.fnst@cn.fujitsu.com
State Changes Requested
Delegated to: Petr Vorel
Headers show
Series sctp: insert a space to isolate two word | expand

Commit Message

Sun Lianwen June 4, 2018, 3:26 a.m. UTC
In statement tst_brkm(TBROK, tst_exit, "a b"
              "c");
There is need a space between word "b" and "c" to isolate these
two words, otherwise will print "a bc"

Reported-by: Wei Xingshen <weixshen@gmail.com>
Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
---
 utils/sctp/testlib/sctputil.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Petr Vorel June 4, 2018, 5:52 a.m. UTC | #1
Hi Sun,

> In statement tst_brkm(TBROK, tst_exit, "a b"
>               "c");
> There is need a space between word "b" and "c" to isolate these
> two words, otherwise will print "a bc"

> Reported-by: Wei Xingshen <weixshen@gmail.com>
> Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
> ---
>  utils/sctp/testlib/sctputil.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

> diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
> index 564925ce9..6f873d8d2 100644
> --- a/utils/sctp/testlib/sctputil.c
> +++ b/utils/sctp/testlib/sctputil.c
> @@ -198,7 +198,7 @@ test_check_buf_notification(void *buf, int datalen, int msg_flags,

>  	sn = (union sctp_notification *)buf;
>  	if (sn->sn_header.sn_type != expected_sn_type)
> -		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
> +		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d "
>  			 "expected:%d", sn->sn_header.sn_type,
>  			  expected_sn_type);

> @@ -237,7 +237,7 @@ test_check_buf_data(void *buf, int datalen, int msg_flags,
>  		    uint32_t expected_ppid)
>  {
>  	if (msg_flags & MSG_NOTIFICATION)
> -		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
> +		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a "
>  			 "datamsg");

Correct, thanks for fix. Personally I prefer to join the string to have it on single line,
although it's over 80 chars (better for git grep). There are more of these strings in the
file.


Kind regards,
Petr
Sun Lianwen June 4, 2018, 6:19 a.m. UTC | #2
Hi Petr,

On 06/04/2018 01:52 PM, Petr Vorel wrote:
> Hi Sun,
> 
>> In statement tst_brkm(TBROK, tst_exit, "a b"
>>               "c");
>> There is need a space between word "b" and "c" to isolate these
>> two words, otherwise will print "a bc"
> 
>> Reported-by: Wei Xingshen <weixshen@gmail.com>
>> Signed-off-by: Sun Lianwen <sunlw.fnst@cn.fujitsu.com>
>> ---
>>  utils/sctp/testlib/sctputil.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
>> diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
>> index 564925ce9..6f873d8d2 100644
>> --- a/utils/sctp/testlib/sctputil.c
>> +++ b/utils/sctp/testlib/sctputil.c
>> @@ -198,7 +198,7 @@ test_check_buf_notification(void *buf, int datalen, int msg_flags,
> 
>>  	sn = (union sctp_notification *)buf;
>>  	if (sn->sn_header.sn_type != expected_sn_type)
>> -		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
>> +		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d "
>>  			 "expected:%d", sn->sn_header.sn_type,
>>  			  expected_sn_type);
> 
>> @@ -237,7 +237,7 @@ test_check_buf_data(void *buf, int datalen, int msg_flags,
>>  		    uint32_t expected_ppid)
>>  {
>>  	if (msg_flags & MSG_NOTIFICATION)
>> -		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
>> +		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a "
>>  			 "datamsg");
> 
> Correct, thanks for fix. Personally I prefer to join the string to have it on single line,
> although it's over 80 chars (better for git grep). There are more of these strings in the
> file.
> 
Thanks your advise, I will rewrite a patch
> 
> Kind regards,
> Petr
> 
> 
> .
> 
Thanks 
Sun Lianwen
diff mbox series

Patch

diff --git a/utils/sctp/testlib/sctputil.c b/utils/sctp/testlib/sctputil.c
index 564925ce9..6f873d8d2 100644
--- a/utils/sctp/testlib/sctputil.c
+++ b/utils/sctp/testlib/sctputil.c
@@ -198,7 +198,7 @@  test_check_buf_notification(void *buf, int datalen, int msg_flags,
 		
 	sn = (union sctp_notification *)buf;
 	if (sn->sn_header.sn_type != expected_sn_type)
-		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d"
+		tst_brkm(TBROK, tst_exit, "Unexpected notification:%d "
 			 "expected:%d", sn->sn_header.sn_type,
 			  expected_sn_type);
 	
@@ -237,7 +237,7 @@  test_check_buf_data(void *buf, int datalen, int msg_flags,
 		    uint32_t expected_ppid)
 {
 	if (msg_flags & MSG_NOTIFICATION)
-		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a"
+		tst_brkm(TBROK, tst_exit, "Got a notification, expecting a "
 			 "datamsg");
 
 	if (expected_datalen <= 0)