Change type of variable 'i' to size_t for comparison of idential types.
In this case, size_t (unsigned) has big max value than max value of int (signed).
Therefore, it can cause wrong result when performing comparison operation.
For example, 'for (int i = 0; i < size_t size; i++)' can cause overflow of 'i',
so it would result in infinite loops.
Change-Id: I9d06aca90908bc3320c82beaace6f365c9f2d710
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
GVariant *parameters, GDBusMethodInvocation *invocation,
gpointer user_data)
{
- int i;
+ size_t i;
struct d_bus_method_handle *handle;
int name_len;
resourced_ret_c d_bus_register_signals(const struct d_bus_signal *signals, const size_t size)
{
- int i;
+ size_t i;
int ret;
for (i = 0; i < size; i++) {