We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1e0c58 commit 1c79c3aCopy full SHA for 1c79c3a
1 file changed
mag2tor.cpp
@@ -15,18 +15,20 @@
15
#include <libtorrent/torrent_handle.hpp>
16
#include <libtorrent/torrent_info.hpp>
17
18
+int usage(const char *argv0) {
19
+ std::cerr << "usage: " << argv0 << " <magnet-url>" <<
20
+ std::endl;
21
+ return 1;
22
+}
23
+
24
namespace lt = libtorrent;
25
int main(int argc, char *argv[]) {
26
std::set_terminate(__gnu_cxx::__verbose_terminate_handler);
27
28
lt::session_settings sset;
29
sset.prefer_udp_trackers = false;
30
- if (argc != 2) {
- std::cerr << "usage: " << argv[0] << " <magnet-url>" <<
- std::endl;
- return 1;
- }
31
+ if (argc != 2) return usage(argv[0]);
32
33
lt::session sess;
34
sess.set_settings(sset);
0 commit comments