Add OutOfMemory log helper
Add a special LOG_OOM() function to log all OutOfMemory errors (i.e. allocations returning NULL).
This commit is contained in:
@@ -160,6 +160,7 @@ static bool
|
||||
sc_hid_keyboard_event_init(struct sc_hid_event *hid_event) {
|
||||
unsigned char *buffer = malloc(HID_KEYBOARD_EVENT_SIZE);
|
||||
if (!buffer) {
|
||||
LOG_OOM();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user