diff options
author | Nathan Hjelm <hjelmn@me.com> | 2021-12-31 10:21:38 -0700 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2023-01-20 11:04:14 +0100 |
commit | 3c33e499a051562a4bafaeb38a79089351c94381 (patch) | |
tree | b1108eef39580285610b501bef433fe42dfee46c /tests/umockdev.c | |
parent | 6622f386f52807dac76c8a260c98aa02c311bc93 (diff) | |
download | libusb-3c33e499a051562a4bafaeb38a79089351c94381.tar.gz |
Update tests and example to use the new libusb_init_context() function
This commit updates all test and example code to use the newer
libusb_init_context() function instead of libusb_init().
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
[Tormod: Update umockdev.c as well]
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Diffstat (limited to 'tests/umockdev.c')
-rw-r--r-- | tests/umockdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/umockdev.c b/tests/umockdev.c index 488edc2..9362b06 100644 --- a/tests/umockdev.c +++ b/tests/umockdev.c @@ -430,7 +430,7 @@ test_fixture_setup_libusb(UMockdevTestbedFixture * fixture, int devcount) { libusb_device **devs = NULL; - libusb_init (&fixture->ctx); + libusb_init_context(/*ctx=*/&fixture->ctx, /*options=*/NULL, /*num_options=*/0); /* Supress global log messages completely * (though, in some tests it might be interesting to check there are no real ones). @@ -573,7 +573,7 @@ test_implicit_default(UMockdevTestbedFixture * fixture, UNUSED_DATA) libusb_free_device_list(devs, TRUE); clear_libusb_log(fixture, LIBUSB_LOG_LEVEL_INFO); - libusb_init(NULL); + libusb_init_context(/*ctx=*/NULL, /*options=*/NULL, /*num_options=*/0); g_assert_cmpint(libusb_get_device_list(NULL, &devs), ==, 1); libusb_exit(NULL); |