forked from Imagelibrary/rtems
libtests/termios04: Avoid NULL pointer access
This commit is contained in:
@@ -153,9 +153,12 @@ ssize_t termios_test_driver_write_helper(
|
||||
size_t len
|
||||
)
|
||||
{
|
||||
Tx_Buffer[Tx_Index++] = buf[0];
|
||||
(void) rtems_timer_fire_after( Tx_Timer, 10, Tx_ISR, NULL );
|
||||
return 1;
|
||||
if (len > 0) {
|
||||
Tx_Buffer[Tx_Index++] = buf[0];
|
||||
(void) rtems_timer_fire_after( Tx_Timer, 10, Tx_ISR, NULL );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user