diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2004-03-13 15:15:26 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2004-03-13 15:15:26 +0000 |
commit | 7b62a629e8f053cd28f3882769c2e55457cc88f8 (patch) | |
tree | 2a63a504c6672fed9d3c15392cc5dbe9aa2238f5 /gtk/gsm_map_stat.c | |
parent | 47b176f9837829c36b008496e6406448fdc645d2 (diff) | |
download | wireshark-7b62a629e8f053cd28f3882769c2e55457cc88f8.tar.gz wireshark-7b62a629e8f053cd28f3882769c2e55457cc88f8.tar.bz2 wireshark-7b62a629e8f053cd28f3882769c2e55457cc88f8.zip |
replaced sprintf / snprintf by g_snprintf,
various other string related changes
svn path=/trunk/; revision=10373
Diffstat (limited to 'gtk/gsm_map_stat.c')
-rw-r--r-- | gtk/gsm_map_stat.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <gerald@ethereal.com> @@ -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); |