diff mbox series

[1/2] Fix formatting signal name in tst_strstatus()

Message ID 20200924144246.12750-1-mdoucha@suse.cz
State Accepted
Headers show
Series [1/2] Fix formatting signal name in tst_strstatus() | expand

Commit Message

Martin Doucha Sept. 24, 2020, 2:42 p.m. UTC
Signed-off-by: Martin Doucha <mdoucha@suse.cz>
---
 lib/tst_status.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Li Wang Sept. 25, 2020, 3:20 a.m. UTC | #1
On Thu, Sep 24, 2020 at 10:43 PM Martin Doucha <mdoucha@suse.cz> wrote:

> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
>
Acked-by: Li Wang <liwang@redhat.com>


> ---
>  lib/tst_status.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/tst_status.c b/lib/tst_status.c
> index f1affeac5..9124faaa3 100644
> --- a/lib/tst_status.c
> +++ b/lib/tst_status.c
> @@ -20,7 +20,8 @@ const char *exited(int status)
>
>  const char *signaled(int status)
>  {
> -       snprintf(buf, sizeof(buf), "killed by %s", tst_strsig(status));
> +       snprintf(buf, sizeof(buf), "killed by %s",
> +               tst_strsig(WTERMSIG(status)));
>
>         return buf;
>  }
> --
> 2.28.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
>
>
Cyril Hrubis Sept. 25, 2020, 12:24 p.m. UTC | #2
Hi!
Pushed, thanks.
diff mbox series

Patch

diff --git a/lib/tst_status.c b/lib/tst_status.c
index f1affeac5..9124faaa3 100644
--- a/lib/tst_status.c
+++ b/lib/tst_status.c
@@ -20,7 +20,8 @@  const char *exited(int status)
 
 const char *signaled(int status)
 {
-	snprintf(buf, sizeof(buf), "killed by %s", tst_strsig(status));
+	snprintf(buf, sizeof(buf), "killed by %s",
+		tst_strsig(WTERMSIG(status)));
 
 	return buf;
 }