From d22034da967a784498716a2c1a6823a8b904ec60 Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Tue, 12 May 2020 07:45:12 +0300 Subject: [PATCH] lint fixes --- src/device.c | 2 +- src/http/server.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 05eac48..6842e3e 100644 --- a/src/device.c +++ b/src/device.c @@ -705,7 +705,7 @@ static const char *_format_to_string_fourcc(char *buf, size_t size, unsigned for buf[1] = (format >> 8) & 0x7F; buf[2] = (format >> 16) & 0x7F; buf[3] = (format >> 24) & 0x7F; - if (format & (1 << 31)) { + if (format & ((unsigned)1 << 31)) { buf[4] = '-'; buf[5] = 'B'; buf[6] = 'E'; diff --git a/src/http/server.c b/src/http/server.c index 9f97613..95fdd6d 100644 --- a/src/http/server.c +++ b/src/http/server.c @@ -680,9 +680,10 @@ static void _http_callback_stream_error(UNUSED struct bufferevent *buf_event, UN # define RUN(_next) client->server->run->_next + assert(RUN(stream_clients_count) > 0); RUN(stream_clients_count) -= 1; - if (RUN(stream_clients_count) <= 0) { + if (RUN(stream_clients_count) == 0) { if (client->server->slowdown) { stream_switch_slowdown(RUN(stream), true); }