mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
parent
92fa92b8d4
commit
6197964d15
1 changed files with 6 additions and 7 deletions
|
@ -77,13 +77,13 @@ int main( int argc, char ** argv )
|
|||
if( parseCommandLine( argc, argv ) )
|
||||
{
|
||||
printf( USAGE, argv[0], TR_DEFAULT_PORT );
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if( showHelp )
|
||||
{
|
||||
printf( USAGE, argv[0], TR_DEFAULT_PORT );
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if( verboseLevel < 0 )
|
||||
|
@ -104,7 +104,7 @@ int main( int argc, char ** argv )
|
|||
if( bindPort < 1 || bindPort > 65535 )
|
||||
{
|
||||
printf( "Invalid port '%d'\n", bindPort );
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
/* Initialize libtransmission */
|
||||
|
@ -114,7 +114,8 @@ int main( int argc, char ** argv )
|
|||
if( !( tor = tr_torrentInit( h, torrentPath, 0, &error ) ) )
|
||||
{
|
||||
printf( "Failed opening torrent file `%s'\n", torrentPath );
|
||||
goto failed;
|
||||
tr_close( h );
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if( showInfo )
|
||||
|
@ -252,11 +253,9 @@ int main( int argc, char ** argv )
|
|||
|
||||
cleanup:
|
||||
tr_torrentClose( h, tor );
|
||||
|
||||
failed:
|
||||
tr_close( h );
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static int parseCommandLine( int argc, char ** argv )
|
||||
|
|
Loading…
Reference in a new issue