From: <fac...@us...> - 2006-10-25 12:14:27
|
Revision: 17580 http://svn.sourceforge.net/gaim/?rev=17580&view=rev Author: faceprint Date: 2006-10-25 05:14:23 -0700 (Wed, 25 Oct 2006) Log Message: ----------- sizeof() != strlen(), and there was a cleaner way to do this anyways Modified Paths: -------------- trunk/gtk/gtkconv.c Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2006-10-25 07:19:20 UTC (rev 17579) +++ trunk/gtk/gtkconv.c 2006-10-25 12:14:23 UTC (rev 17580) @@ -4627,11 +4627,9 @@ static GtkTextTag *get_buddy_tag(GaimConversation *conv, const char *who) { GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv); GtkTextTag *buddytag; - /* strlen("BUDDY ") == 6 */ - gchar str[strlen(who) + 7]; + gchar *str; - g_snprintf(str, sizeof(str), "BUDDY %s", who); - str[sizeof(str)] = '\0'; + str = g_strdup_printf("BUDDY %s", who); buddytag = gtk_text_tag_table_lookup( gtk_text_buffer_get_tag_table( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |