diff options
author | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-28 03:04:09 +0000 |
---|---|---|
committer | sfisher <sfisher@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-11-28 03:04:09 +0000 |
commit | d38889d5e6b22caa1bedcab655072bb5310a23ba (patch) | |
tree | 6fa5f2d5aee17661e6de6b3b27edc4a8ef64aa64 /gtk/service_response_time_table.c | |
parent | 4dfd63079d6f93095e78537851b972dab49aba4c (diff) |
Fix bug #954 for LDAP SRT stats along with the same problem in all the other
SRT code.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23640 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/service_response_time_table.c')
-rw-r--r-- | gtk/service_response_time_table.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gtk/service_response_time_table.c b/gtk/service_response_time_table.c index a7c3838ad8..ec086b109e 100644 --- a/gtk/service_response_time_table.c +++ b/gtk/service_response_time_table.c @@ -160,7 +160,7 @@ srt_select_filter_cb(GtkWidget *widget _U_, gpointer callback_data, guint callba { int action, type, selection; srt_stat_table *rst = (srt_stat_table *)callback_data; - char str[256]; + char *str = NULL; const char *current_filter; @@ -184,27 +184,32 @@ srt_select_filter_cb(GtkWidget *widget _U_, gpointer callback_data, guint callba switch(type){ case 0: /* selected */ - g_snprintf(str, 255, "%s==%d", rst->filter_string, selection); + str = g_strdup_printf("%s==%d", rst->filter_string, selection); break; case 1: /* not selected */ - g_snprintf(str, 255, "!(%s==%d)", rst->filter_string, selection); + str = g_strdup_printf("!(%s==%d)", rst->filter_string, + selection); break; case 2: /* and selected */ - g_snprintf(str, 255, "(%s) && (%s==%d)", current_filter, rst->filter_string, selection); + str = g_strdup_printf("(%s) && (%s==%d)", current_filter, + rst->filter_string, selection); break; case 3: /* or selected */ - g_snprintf(str, 255, "(%s) || (%s==%d)", current_filter, rst->filter_string, selection); + str = g_strdup_printf("(%s) || (%s==%d)", current_filter, + rst->filter_string, selection); break; case 4: /* and not selected */ - g_snprintf(str, 255, "(%s) && !(%s==%d)", current_filter, rst->filter_string, selection); + str = g_strdup_printf("(%s) && !(%s==%d)", current_filter, + rst->filter_string, selection); break; case 5: /* or not selected */ - g_snprintf(str, 255, "(%s) || !(%s==%d)", current_filter, rst->filter_string, selection); + str = g_strdup_printf("(%s) || !(%s==%d)", current_filter, + rst->filter_string, selection); break; } @@ -236,6 +241,7 @@ srt_select_filter_cb(GtkWidget *widget _U_, gpointer callback_data, guint callba break; } + g_free(str); } static gint |