i2c: fix struct initialization

pn532_i2c.c:125:57: warning: missing field 'tv_nsec' initializer [-Wmissing-field-initializers]
        struct timespec transaction_start, bus_free_time = { 0 };
                                                               ^
pn532_i2c.c:153:57: warning: missing field 'tv_nsec' initializer [-Wmissing-field-initializers]
        struct timespec transaction_start, bus_free_time = { 0 };
This commit is contained in:
Philippe Teuwen 2017-02-18 17:23:22 +01:00
parent c815c7a059
commit 05220537ea

View file

@ -122,7 +122,7 @@ static struct timespec __transaction_stop;
static ssize_t pn532_i2c_read(const i2c_device id,
uint8_t *buf, const size_t len)
{
struct timespec transaction_start, bus_free_time = { 0 };
struct timespec transaction_start, bus_free_time = { 0, 0 };
ssize_t ret;
clock_gettime(CLOCK_MONOTONIC, &transaction_start);
@ -150,7 +150,7 @@ static ssize_t pn532_i2c_read(const i2c_device id,
static ssize_t pn532_i2c_write(const i2c_device id,
const uint8_t *buf, const size_t len)
{
struct timespec transaction_start, bus_free_time = { 0 };
struct timespec transaction_start, bus_free_time = { 0, 0 };
ssize_t ret;
clock_gettime(CLOCK_MONOTONIC, &transaction_start);