Changeset 6490 for trunk/gtk/tr-prefs.c


Ignore:
Timestamp:
Aug 11, 2008, 7:05:02 PM (13 years ago)
Author:
charles
Message:

lots of C correctness tweaks suggested by sparse/cgcc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-prefs.c

    r6369 r6490  
    271271testing_port_cb( GtkWidget * unused UNUSED, gpointer l )
    272272{
     273    struct test_port_data * data;
     274
    273275    gtk_label_set_markup( GTK_LABEL( l ), _( "<i>Testing port...</i>" ) );
     276
    274277    /* wait three seconds to give the port forwarding time to kick in */
    275     struct test_port_data * data = g_new0( struct test_port_data, 1 );
     278    data = g_new0( struct test_port_data, 1 );
    276279    data->label = l;
    277280    data->alive = g_object_get_data( G_OBJECT( l ), "alive" );
     
    419422    if( ok && !data->abortFlag )
    420423    {
     424        char * cmd;
    421425        filename2 = g_strdup_printf( "%s.txt", filename );
    422426        g_snprintf( data->secondary, sizeof( data->secondary ),
    423427                    _( "Uncompressing blocklist..." ) );
    424428        g_idle_add( blocklistDialogSetSecondary, data );
    425         char * cmd = g_strdup_printf( "zcat %s > %s ", filename, filename2 );
     429        cmd = g_strdup_printf( "zcat %s > %s ", filename, filename2 );
    426430        tr_dbg( "%s", cmd );
    427431        system( cmd );
Note: See TracChangeset for help on using the changeset viewer.