]> granicus.if.org Git - strace/blobdiff - wait.c
nlattr: add UID/GID netlink attribute decoders
[strace] / wait.c
diff --git a/wait.c b/wait.c
index fc519353bf1f50fc0adc4bdda3aff26bf55d4347..c1d1dff24952b6be91feeb39232a9e3ccf0be834 100644 (file)
--- a/wait.c
+++ b/wait.c
@@ -7,7 +7,7 @@
  * Copyright (c) 2004 Ulrich Drepper <drepper@redhat.com>
  * Copyright (c) 2009-2013 Denys Vlasenko <dvlasenk@redhat.com>
  * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
- * Copyright (c) 2014-2017 The strace developers.
+ * Copyright (c) 2014-2018 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,6 +34,7 @@
  */
 
 #include "defs.h"
+#include "ptrace.h"
 
 #include <sys/wait.h>
 
@@ -58,7 +59,6 @@
 # define W_CONTINUED 0xffff
 #endif
 
-#include "ptrace.h"
 #include "xlat/ptrace_events.h"
 
 static int
@@ -77,14 +77,12 @@ printstatus(int status)
                        signame(sig & 0x7f),
                        sig & 0x80 ? " | 0x80" : "");
                status &= ~W_STOPCODE(sig);
-       }
-       else if (WIFSIGNALED(status)) {
+       } else if (WIFSIGNALED(status)) {
                tprintf("[{WIFSIGNALED(s) && WTERMSIG(s) == %s%s}",
                        signame(WTERMSIG(status)),
                        WCOREDUMP(status) ? " && WCOREDUMP(s)" : "");
                status &= ~(W_EXITCODE(0, WTERMSIG(status)) | WCOREFLAG);
-       }
-       else if (WIFEXITED(status)) {
+       } else if (WIFEXITED(status)) {
                tprintf("[{WIFEXITED(s) && WEXITSTATUS(s) == %d}",
                        WEXITSTATUS(status));
                exited = 1;