[PATCH RFC 13/14] task: format string should be never empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Oleksandr Natalenko <oleksandr@xxxxxxxxxx>
---
 task.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/task.c b/task.c
index 261ca31..fd8503f 100644
--- a/task.c
+++ b/task.c
@@ -790,10 +790,11 @@ refresh_fixed_task_table(void)
 		return;
 
 	if (DUMPFILE()) {
-        	fprintf(fp, (pc->flags & SILENT) || !(pc->flags & TTY) ?
-                        "" : "%splease wait... (gathering task table data)",
-			GDB_PATCHED() ? "" : "\n");
-		fflush(fp);
+		if (!((pc->flags & SILENT) || !(pc->flags & TTY))) {
+			fprintf(fp, "%splease wait... (gathering task table data)",
+				GDB_PATCHED() ? "" : "\n");
+			fflush(fp);
+		}
 		if (!symbol_exists("panic_threads"))
 			tt->flags |= POPULATE_PANIC;
 	} 
@@ -933,10 +934,11 @@ refresh_unlimited_task_table(void)
 		return;
 
         if (DUMPFILE()) {
-                fprintf(fp, (pc->flags & SILENT) || !(pc->flags & TTY) ?
-                        "" : "%splease wait... (gathering task table data)",
-                        GDB_PATCHED() ? "" : "\n");
-                fflush(fp);
+			if (!((pc->flags & SILENT) || !(pc->flags & TTY))) {
+				fprintf(fp, "%splease wait... (gathering task table data)",
+					GDB_PATCHED() ? "" : "\n");
+				fflush(fp);
+			}
 		if (!symbol_exists("panic_threads"))
 			tt->flags |= POPULATE_PANIC;
         } 
-- 
2.14.3

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux