tests: don't print '\0' character

Submitted by Marek Chalupa on Nov. 19, 2014, 10:58 a.m.

Details

Message ID 1416394706-13012-1-git-send-email-mchqwerty@gmail.com
State Accepted
Commit 4d617b83a7cbdb2eefb72796fc971564743e2bc5
Headers show

Not browsing as part of any series.

Commit Message

Marek Chalupa Nov. 19, 2014, 10:58 a.m.
print "" (which results in no output) instead of
printing '\0' (which is not visible, but is there)

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
---
 tests/test-runner.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/test-runner.c b/tests/test-runner.c
index a6c75a9..1373225 100644
--- a/tests/test-runner.c
+++ b/tests/test-runner.c
@@ -132,8 +132,8 @@  test_set_timeout(unsigned int to)
 	fprintf(stderr, "Timeout was %sset", re ? "re-" : "");
 
 	if (to != 0)
-		fprintf(stderr, " to %d second%c from now.\n",
-			to, to > 1 ? 's' : 0);
+		fprintf(stderr, " to %d second%s from now.\n",
+			to, to > 1 ? "s" : "");
 	else
 		fprintf(stderr, " off.\n");
 }

Comments

On Wed, 19 Nov 2014 11:58:26 +0100
Marek Chalupa <mchqwerty@gmail.com> wrote:

> print "" (which results in no output) instead of
> printing '\0' (which is not visible, but is there)
> 
> Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
> ---
>  tests/test-runner.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/test-runner.c b/tests/test-runner.c
> index a6c75a9..1373225 100644
> --- a/tests/test-runner.c
> +++ b/tests/test-runner.c
> @@ -132,8 +132,8 @@ test_set_timeout(unsigned int to)
>  	fprintf(stderr, "Timeout was %sset", re ? "re-" : "");
>  
>  	if (to != 0)
> -		fprintf(stderr, " to %d second%c from now.\n",
> -			to, to > 1 ? 's' : 0);
> +		fprintf(stderr, " to %d second%s from now.\n",
> +			to, to > 1 ? "s" : "");
>  	else
>  		fprintf(stderr, " off.\n");
>  }

Pushed.

Thanks,
pq