Semilar to register_error_str, but allows passing a format string with va_list args into this function. */
| 135 | |
| 136 | /* Semilar to register_error_str, but allows passing a format string with va_list args into this function. */ |
| 137 | static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args) |
| 138 | { |
| 139 | char msg[256]; |
| 140 | vsnprintf(msg, sizeof(msg), format, args); |
| 141 | |
| 142 | register_error_str(error_str, msg); |
| 143 | } |
| 144 | |
| 145 | /* Set the last global error to be reported by hid_error(NULL). |
| 146 | * The given error message will be copied (and decoded according to the |
no test coverage detected