The passed-in filter string can no longer be NULL, so use strlen instead of testing...
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 8 Jun 2011 17:08:27 +0000 (17:08 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 8 Jun 2011 17:08:27 +0000 (17:08 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37621 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/mac_lte_stat_dlg.c
gtk/rlc_lte_stat_dlg.c

index 89feeb29fba79b089cc4a6fd8b595f7a9779c7ec..c0eaa7b49c61ebe65143e2603749e5406148d8d2 100644 (file)
@@ -227,7 +227,7 @@ mac_lte_stat_reset(void *phs)
     if (mac_lte_stat->mac_lte_stat_dlg_w != NULL) {
         g_snprintf(title, sizeof(title), "Wireshark: LTE MAC Traffic Statistics: %s (filter=\"%s\")",
                    cf_get_display_name(&cfile),
-                   mac_lte_stat->filter ? mac_lte_stat->filter : "none");
+                   strlen(mac_lte_stat->filter) ? mac_lte_stat->filter : "none");
         gtk_window_set_title(GTK_WINDOW(mac_lte_stat->mac_lte_stat_dlg_w), title);
     }
 
@@ -683,7 +683,7 @@ mac_lte_stat_draw(void *phs)
                cf_get_display_name(&cfile),
                number_of_ues,
                hs->common_stats.all_frames,
-               hs->filter ? hs->filter : "none");
+               strlen(hs->filter) ? hs->filter : "none");
     gtk_window_set_title(GTK_WINDOW(hs->mac_lte_stat_dlg_w), title);
 
 
@@ -787,7 +787,7 @@ static void set_filter_expression(guint16  ueid,
     }
 
     /* Filter expression */
-    if (hs->filter) {
+    if (strlen(hs->filter)) {
         offset += g_snprintf(buffer+offset, MAX_FILTER_LEN-offset, "%s and ", hs->filter);
     }
 
index 675cdadceaa658fadc2a2f62d48463c209fff50a..cb6d6d85c1279154752b5a70a7151be5e50a83dc 100644 (file)
@@ -277,7 +277,7 @@ rlc_lte_stat_reset(void *phs)
     if (rlc_lte_stat->dlg_w != NULL) {
         g_snprintf(title, sizeof(title), "Wireshark: LTE RLC Traffic Statistics: %s (filter=\"%s\")",
                    cf_get_display_name(&cfile),
-                   rlc_lte_stat->filter ? rlc_lte_stat->filter : "none");
+                   strlen(rlc_lte_stat->filter) ? rlc_lte_stat->filter : "none");
         gtk_window_set_title(GTK_WINDOW(rlc_lte_stat->dlg_w), title);
     }
 
@@ -740,7 +740,7 @@ rlc_lte_stat_draw(void *phs)
                cf_get_display_name(&cfile),
                number_of_ues,
                hs->total_frames,
-               hs->filter ? hs->filter : "none");
+               strlen(hs->filter) ? hs->filter : "none");
     gtk_window_set_title(GTK_WINDOW(hs->dlg_w), title);
 
 
@@ -985,7 +985,7 @@ static void set_channel_filter_expression(guint16  ueid,
     }
 
     /* Include dialog filter */
-    if (hs->filter) {
+    if (strlen(hs->filter)) {
         offset += g_snprintf(buffer+offset, MAX_FILTER_LEN-offset, "%s and ", hs->filter);
     }