From: Uwe Hermann Date: Sat, 28 Nov 2015 23:23:53 +0000 (+0100) Subject: Make all sizeof() consistently use parenthesis. X-Git-Tag: libsigrok-0.4.0~96 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b3cfc6e98e34e54a11d5a9563f6f7ac282c92983;p=libsigrok.git Make all sizeof() consistently use parenthesis. --- diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index ba9ca4fa..516726a3 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -264,7 +264,7 @@ static int drain_usb(struct sr_usb_dev_inst *usb, unsigned int endpoint) do { xfer_len = 0; ret = libusb_bulk_transfer(usb->devhdl, endpoint, - buf, sizeof buf, &xfer_len, + buf, sizeof(buf), &xfer_len, drain_timeout_ms); drained += xfer_len; } while (ret == LIBUSB_SUCCESS && xfer_len != 0); diff --git a/src/session_file.c b/src/session_file.c index d86f5c1c..467c5812 100644 --- a/src/session_file.c +++ b/src/session_file.c @@ -278,7 +278,7 @@ SR_API int sr_session_load(struct sr_context *ctx, const char *filename, sr_config_set(sdi, NULL, SR_CONF_NUM_LOGIC_CHANNELS, g_variant_new_int32(total_channels)); for (k = 0; k < total_channels; k++) { - g_snprintf(channelname, sizeof channelname, + g_snprintf(channelname, sizeof(channelname), "%d", k); sr_channel_new(sdi, k, SR_CHANNEL_LOGIC, FALSE, channelname);