diff options
author | Stephen Fisher <steve@stephen-fisher.com> | 2007-11-28 03:04:09 +0000 |
---|---|---|
committer | Stephen Fisher <steve@stephen-fisher.com> | 2007-11-28 03:04:09 +0000 |
commit | 9d83eb39fc98f58bb04b4dea1c16046967896c56 (patch) | |
tree | 6fa5f2d5aee17661e6de6b3b27edc4a8ef64aa64 /gtk/service_response_time_table.c | |
parent | c232d0b3857c0bd657b94a5e4604db7d5d16aa08 (diff) |
Fix bug #954 for LDAP SRT stats along with the same problem in all the other
SRT code.
svn path=/trunk/; revision=23640
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 |