Fix hid_read_error documentation (#742)

This commit is contained in:
Ihor Dutchak
2025-05-18 21:25:13 +03:00
committed by GitHub
parent 3425db0fee
commit d6b2a97460

View File

@@ -379,14 +379,10 @@ extern "C" {
This function is intended for logging/debugging purposes.
This function guarantees to never return NULL.
This function guarantees to never return NULL for a valid @ref dev.
If there was no error in the last call to hid_read/hid_read_error -
the returned string clearly indicates that.
Any HIDAPI function that can explicitly indicate an execution failure
(e.g. by an error code, or by returning NULL) - may set the error string,
to be returned by this function.
Strings returned from hid_read_error() must not be freed by the user,
i.e. owned by HIDAPI library.
Device-specific error string may remain allocated at most until hid_close() is called.