AP_HAL_SITL: add const

This commit is contained in:
Tom Pittenger 2017-12-01 12:49:27 -08:00 committed by Randy Mackay
parent bd1110f444
commit da11241aa8

View File

@ -155,7 +155,7 @@ size_t UARTDriver::write(const uint8_t *buffer, size_t size)
}
if (_unbuffered_writes) {
// write buffer straight to the file descriptor
ssize_t nwritten = ::write(_fd, buffer, size);
const ssize_t nwritten = ::write(_fd, buffer, size);
if (nwritten == -1 && errno != EAGAIN && _uart_path) {
close(_fd);
_fd = -1;