Marco Trevisan (Treviño)
ee73d67765
scripts/uncrustify: Use 2-spaces indentation for defines too
2025-02-20 15:50:46 +00:00
Vasily Khoruzhick
a5d52eb853
Fix indentation issues with uncrustify-0.76.0
...
Apparently older version didn't find this indentation issues
2023-01-08 23:36:18 -08:00
Marco Trevisan (Treviño)
171e65f73f
libfprint: Use g_memdup2 everywhere
...
It's just safer when available.
2022-09-27 17:10:33 +02:00
Benjamin Berg
e2f199bb6a
vfs301: Fix leak of USB transfer
...
vfs301_proto_peek_event would leak the returned transfer. Use a
g_autoptr to fix this.
2021-06-23 22:49:59 +02:00
Benjamin Berg
ce39f27b5e
vfs301_proto: Remove usless break after return
...
Closes : #341
2020-11-30 20:22:18 +00:00
Benjamin Berg
d3076039d0
vfs301: Fix device pointer handling in callback
...
When porting the driver to the new libfprint 1.90.0 a mistake was made
where the device was not passed through user_data anymore but it was
still read from there. Stop using user_data in the callback to fix this.
See: #320
2020-11-04 14:13:00 +01:00
Benjamin Berg
7eb361087a
drivers: Add access annotations to USB helpers
...
Mostly for completeness sake, doing this did not find any errors (but
might catch some issues with fixed buffer lengths).
2020-10-07 13:38:59 +02:00
Benjamin Berg
6633025437
vfs301: Allow freeing of data by copying it
...
When sending static data, it would not be copied. The function that
sends it assumed that it should be free'ed though.
Fix this by simply always making a copy.
2020-06-05 15:17:42 +00:00
Benjamin Berg
744a71ce08
vfs301: Assert hex string has 2 or more characters
...
Otherwise static analysis thinks we may end up allocating a 0 byte
output buffer.
2020-05-07 14:22:02 +00:00
Marco Trevisan (Treviño)
20a52593eb
vfs301: Use a transfer autopointer to cleanup it on sync submission
...
Partially revert commit a855c0cc7 , since the driver uses a sync transfer
and in such case the caller still keeps the ownership.
2019-12-03 13:58:42 +00:00
Benjamin Berg
4115ae7ced
Fix indentation issues using newer uncrustify
...
Seems like the older uncrustify versions did not find these indentation
issues. Fix them.
Old versions of uncrustify will leave things as is, so this is not a
problem if developers are using an old version of uncrustify.
2019-12-02 17:04:05 +01:00
Marco Trevisan (Treviño)
2642fc6560
fpi-usb-transfer: Take ownership of the transfer when submitting it
...
When a transfer is completed, we automatically unref it since we can't
consider it valid anymore since this point.
Update the drivers not to free the transfer after submitting anymore.
2019-11-27 21:02:19 +01:00
Marco Trevisan (Treviño)
d1fb1e26f3
Uncrustify everything except for nbis
2019-11-20 20:38:06 +01:00
Benjamin Berg
2e30572364
vfs301: Port driver to new API
...
This driver is synchronuous mostly, and the sync API is not well tested.
It should work, but there has been some re-shuffling of buffers, etc.
2019-11-20 13:53:45 +01:00
Bastien Nocera
10ae8ffb55
drivers: Simplify libusb_alloc_transfer(0) calls
...
By using our new, never-failing, USB allocation wrapper. As it can never
fail, we can also remove all the error paths for the allocations
failing.
2018-09-19 17:06:17 +02:00
Bastien Nocera
501020921e
vfs301_proto: Use GLib helpers
...
No need to roll out own min() implementation, or use the bare assert().
2018-05-24 17:00:17 +02:00
Andrej Krutak
c3689665db
lib: Add VFS300/VFS301 driver
...
https://bugs.freedesktop.org/show_bug.cgi?id=37574
2012-08-28 19:51:59 +01:00