Avoid possible overflow by casting before arithmetic operation
Change-Id: I0190740a7f3534427ef01fa29ab24bbf7405635e
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
else if (gpio_data->edge == PERIPHERAL_GPIO_EDGE_FALLING && value == 1)
return TRUE;
- timestamp = (unsigned long long)(time.tv_sec * 1000000 + time.tv_usec);
+ timestamp = (unsigned long long)time.tv_sec * 1000000 + time.tv_usec;
peripheral_bus_emit_gpio_changed(gpio_data->gpio_skeleton, gpio_data->pin, value, timestamp);
return TRUE;