Merge pull request #10178 from jcarrano/qualifier-fixes/ethos

drivers/ethos: remove unnecessary casts.
This commit is contained in:
Koen Zandberg 2018-11-07 09:14:40 +01:00 committed by GitHub
commit 64afc748ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,16 +200,16 @@ static size_t iolist_count_total(const iolist_t *iolist)
static void _write_escaped(uart_t uart, uint8_t c) static void _write_escaped(uart_t uart, uint8_t c)
{ {
uint8_t *out; const uint8_t *out;
int n; int n;
switch(c) { switch(c) {
case ETHOS_FRAME_DELIMITER: case ETHOS_FRAME_DELIMITER:
out = (uint8_t*)_esc_delim; out = _esc_delim;
n = 2; n = 2;
break; break;
case ETHOS_ESC_CHAR: case ETHOS_ESC_CHAR:
out = (uint8_t*)_esc_esc; out = _esc_esc;
n = 2; n = 2;
break; break;
default: default:
@ -244,7 +244,7 @@ void ethos_send_frame(ethos_t *dev, const uint8_t *data, size_t len, unsigned fr
/* send frame content */ /* send frame content */
while(len--) { while(len--) {
_write_escaped(dev->uart, *(uint8_t*)data++); _write_escaped(dev->uart, *data++);
} }
/* end of frame */ /* end of frame */