From 7b62a629e8f053cd28f3882769c2e55457cc88f8 Mon Sep 17 00:00:00 2001 From: Ulf Lamping Date: Sat, 13 Mar 2004 15:15:26 +0000 Subject: replaced sprintf / snprintf by g_snprintf, various other string related changes svn path=/trunk/; revision=10373 --- gtk/gsm_map_stat.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gtk/gsm_map_stat.c') diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c index c0c43aeaab..6a55f87644 100644 --- a/gtk/gsm_map_stat.c +++ b/gtk/gsm_map_stat.c @@ -5,7 +5,7 @@ * * MUCH code modified from service_response_time_table.c. * - * $Id: gsm_map_stat.c,v 1.4 2004/02/23 19:19:36 ulfl Exp $ + * $Id: gsm_map_stat.c,v 1.5 2004/03/13 15:15:24 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -119,7 +119,7 @@ gsm_map_stat_draw( void *tapdata) { int i, j; - char str[256], *strp; + char *strp; tapdata = tapdata; @@ -132,8 +132,7 @@ gsm_map_stat_draw( { j = gtk_clist_find_row_from_data(GTK_CLIST(dlg.table), (gpointer) i); - sprintf(str, "%d", stat.opr_code[i]); - strp = g_strdup(str); + strp = g_strdup_printf("%d", stat.opr_code[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 2, strp); g_free(strp); @@ -438,7 +437,7 @@ gsm_map_stat_gtk_cb( i = 0; while (gsm_map_opr_code_strings[i].strptr) { - sprintf(str, "%u", gsm_map_opr_code_strings[i].value); + g_snprintf(str, 100, "%u", gsm_map_opr_code_strings[i].value); dlg.entries[0] = g_strdup(str); dlg.entries[1] = g_strdup(gsm_map_opr_code_strings[i].strptr); -- cgit v1.2.3