MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / register_error_str

Function register_error_str

lib/hidapi/mac/hid.c:239–243  ·  view source on GitHub ↗

Makes a copy of the given error message (and decoded according to the * currently locale) into the wide string pointer pointed by error_str. * The last stored error string is freed. * Use register_error_str(NULL) to free the error message completely. */

Source from the content-addressed store, hash-verified

237 * The last stored error string is freed.
238 * Use register_error_str(NULL) to free the error message completely. */
239static void register_error_str(wchar_t **error_str, const char *msg)
240{
241 free(*error_str);
242 *error_str = utf8_to_wchar_t(msg);
243}
244
245/* Similar to register_error_str, but allows passing a format string with va_list args into this function. */
246static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args)

Callers 3

register_global_errorFunction · 0.70
register_device_errorFunction · 0.70

Calls 1

utf8_to_wchar_tFunction · 0.70

Tested by

no test coverage detected