Similar to register_error_str, but allows passing a format string with va_list args into this function. */
| 244 | |
| 245 | /* Similar to register_error_str, but allows passing a format string with va_list args into this function. */ |
| 246 | static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args) |
| 247 | { |
| 248 | char msg[1024]; |
| 249 | vsnprintf(msg, sizeof(msg), format, args); |
| 250 | |
| 251 | register_error_str(error_str, msg); |
| 252 | } |
| 253 | |
| 254 | /* Set the last global error to be reported by hid_error(NULL). |
| 255 | * The given error message will be copied (and decoded according to the |
no test coverage detected