[sysprof/wip/chergert/path-resolver] tests: cleanup addr decode output



commit 0fd7ea3f803019a00093b41cace7b54e4468d005
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 21 11:50:34 2021 -0700

    tests: cleanup addr decode output

 src/tests/test-addr-decode.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/tests/test-addr-decode.c b/src/tests/test-addr-decode.c
index db1b96b..bfe7db5 100644
--- a/src/tests/test-addr-decode.c
+++ b/src/tests/test-addr-decode.c
@@ -60,10 +60,15 @@ main (gint argc,
                                                                        sample->addrs[i],
                                                                        &tag);
 
-                  g_print ("%u: %s [%s]\n",
-                           i,
-                           name ? name : "-- missing --",
-                           tag ? g_quark_to_string (tag) : "No Tag");
+                  if (tag)
+                    g_print ("%u: %s [%s]\n",
+                             i,
+                             name ? name : "-- missing --",
+                             g_quark_to_string (tag));
+                  else
+                    g_print ("%u: %s\n",
+                             i,
+                             name ? name : "-- missing --");
                 }
 
               g_print ("======\n");


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