]> granicus.if.org Git - strace/commitdiff
startup_attach: fix compilation warning
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 26 Nov 2015 01:54:53 +0000 (01:54 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 26 Nov 2015 01:56:44 +0000 (01:56 +0000)
* strace.c (startup_attach): Split single error_msg statement with
variable number of arguments to silence a compilation warning.

strace.c

index d610f707497cb795821c6453a47b46cb29058fc3..b2b82e3d82e189f527e09c47a4526f8d623d7e02 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -1036,10 +1036,13 @@ startup_attach(void)
                                        continue;
                                }
                                if (!qflag) {
-                                       error_msg(ntid > 1
-? "Process %u attached with %u threads"
-: "Process %u attached",
-                                               tcp->pid, ntid);
+                                       if (ntid > 1)
+                                               error_msg("Process %u attached"
+                                                         " with %u threads",
+                                                         tcp->pid, ntid);
+                                       else
+                                               error_msg("Process %u attached",
+                                                         tcp->pid);
                                }
                                if (!(tcp->flags & TCB_ATTACHED)) {
                                        /* -p PID, we failed to attach to PID itself