diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2021-08-03 10:08:21 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2021-08-03 10:35:11 +0300 |
commit | 6f93de72365499f3431e6de4e81755feb277a103 (patch) | |
tree | d91c8b764f21b506dc75ca244061a61dbadefc8f /lib/sender.c | |
parent | f93f9cda5d8a380bc8846b5de3fc24613466adf3 (diff) |
lib: fix some static analysis warnings
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'lib/sender.c')
-rw-r--r-- | lib/sender.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/sender.c b/lib/sender.c index fa2882e..3617d9e 100644 --- a/lib/sender.c +++ b/lib/sender.c @@ -50,10 +50,10 @@ static int push_sync_task( struct icipc_sender *self, icipc_sender_reply_func_t func, void *data) { - size_t i; + int i; for (i = MAX_ASYNC_TASKS; i > 1; i--) { - SenderTask *curr = self->async_tasks + i - 1; - SenderTask *next = self->async_tasks + i - 2; + SenderTask *curr = &self->async_tasks[i - 1]; + SenderTask *next = &self->async_tasks[i - 2]; if (next->func != NULL && curr->func == NULL) { curr->func = func; curr->data = data; @@ -74,9 +74,9 @@ static void pop_sync_task( bool all, const uint8_t * buffer, size_t size) { - size_t i; + int i; for (i = 0; i < MAX_ASYNC_TASKS; i++) { - SenderTask *task = self->async_tasks + i; + SenderTask *task = &self->async_tasks[i]; if (task->func != NULL) { if (trigger) task->func(self, buffer, size, task->data); |