1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Random minor whitespace fixes.

This commit is contained in:
Uwe Hermann 2019-12-28 19:23:30 +01:00
parent 2e0437c28e
commit 81243567bc
2 changed files with 8 additions and 6 deletions

View File

@ -323,7 +323,8 @@ SP_PRIV struct sp_port **list_append(struct sp_port **list,
void *tmp; void *tmp;
unsigned int count; unsigned int count;
for (count = 0; list[count]; count++); for (count = 0; list[count]; count++)
;
if (!(tmp = realloc(list, sizeof(struct sp_port *) * (count + 2)))) if (!(tmp = realloc(list, sizeof(struct sp_port *) * (count + 2))))
goto fail; goto fail;
list = tmp; list = tmp;
@ -1454,7 +1455,8 @@ SP_API enum sp_return sp_wait(struct sp_event_set *event_set,
#else #else
struct timeval start, delta, now, end = {0, 0}; struct timeval start, delta, now, end = {0, 0};
const struct timeval max_delta = { const struct timeval max_delta = {
(INT_MAX / 1000), (INT_MAX % 1000) * 1000}; (INT_MAX / 1000), (INT_MAX % 1000) * 1000
};
int started = 0, timeout_overflow = 0; int started = 0, timeout_overflow = 0;
int result, timeout_remaining_ms; int result, timeout_remaining_ms;
struct pollfd *pollfds; struct pollfd *pollfds;