]> sigrok.org Git - libsigrok.git/commitdiff
Make all sizeof() consistently use parenthesis.
authorUwe Hermann <redacted>
Sat, 28 Nov 2015 23:23:53 +0000 (00:23 +0100)
committerUwe Hermann <redacted>
Sat, 28 Nov 2015 23:23:53 +0000 (00:23 +0100)
src/hardware/sysclk-lwla/api.c
src/session_file.c

index ba9ca4fa7dd60ae275f094c1336c0cd3f6d18d91..516726a3fe865b684cd5e292866914b9fcba8dd1 100644 (file)
@@ -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);
index d86f5c1c744973715234070e1b3818fd13096610..467c581283a0e55899003f469dea476bcd1e07c9 100644 (file)
@@ -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);