]> granicus.if.org Git - transmission/commitdiff
fix cli compile issue reported & patched by mdomsch
authorCharles Kerr <charles@transmissionbt.com>
Tue, 6 May 2008 16:32:45 +0000 (16:32 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 6 May 2008 16:32:45 +0000 (16:32 +0000)
cli/transmissioncli.c

index d7bce69f0d328216c478a84d418bb331df27c640..89b636a718bf853f3242091618eec2c2842d8861 100644 (file)
@@ -243,15 +243,14 @@ main( int argc, char ** argv )
 
     if( showScrape )
     {
+        const struct tr_stat * stats;
+        const uint64_t start = tr_date( );
         printf( "Scraping, Please wait...\n" );
-        const tr_stat * stats;
-        
-        uint64_t start = tr_date();
         
         do
         {
             stats = tr_torrentStat( tor );
-            if( stats == NULL || tr_date() - start > 20000 )
+            if( !stats || tr_date() - start > 20000 )
             {
                 printf( "Scrape failed.\n" );
                 goto cleanup;
@@ -276,7 +275,7 @@ main( int argc, char ** argv )
     {
         char string[LINEWIDTH];
         int  chars = 0;
-        const tr_stat * s;
+        const struct tr_stat * s;
 
         tr_wait( 1000 );