Changeset e273e9e in mainline for uspace/srv/hid/console/console.c
- Timestamp:
- 2024-10-03T18:48:48Z (2 months ago)
- Branches:
- master
- Children:
- 5132379
- Parents:
- b2c9e42c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/console/console.c
rb2c9e42c re273e9e 334 334 { 335 335 /* Got key press/release event */ 336 cons_ event_t *event =337 (cons_ event_t *) malloc(sizeof(cons_event_t));336 cons_qevent_t *event = 337 (cons_qevent_t *) malloc(sizeof(cons_qevent_t)); 338 338 if (event == NULL) 339 339 return; 340 340 341 *event= *ev;341 event->ev = *ev; 342 342 link_initialize(&event->link); 343 343 … … 556 556 if (pos < size) { 557 557 link_t *link = prodcons_consume(&cons->input_pc); 558 cons_event_t *event = list_get_instance(link, 559 cons_event_t, link); 558 cons_qevent_t *qevent = list_get_instance(link, 559 cons_qevent_t, link); 560 cons_event_t *event = &qevent->ev; 560 561 561 562 /* Accept key presses of printable chars only. */ … … 567 568 } 568 569 569 free( event);570 free(qevent); 570 571 } 571 572 } … … 703 704 console_t *cons = srv_to_console(srv); 704 705 link_t *link = prodcons_consume(&cons->input_pc); 705 cons_ event_t *cevent = list_get_instance(link, cons_event_t, link);706 707 *event = *cevent;708 free( cevent);706 cons_qevent_t *qevent = list_get_instance(link, cons_qevent_t, link); 707 708 *event = qevent->ev; 709 free(qevent); 709 710 return EOK; 710 711 }
Note:
See TracChangeset
for help on using the changeset viewer.