]> sigrok.org Git - libsigrok.git/commitdiff
saleae-logic16: Minor whitespace fixes, cosmetics.
authorUwe Hermann <redacted>
Sat, 3 May 2014 19:22:38 +0000 (21:22 +0200)
committerUwe Hermann <redacted>
Sat, 3 May 2014 19:27:08 +0000 (21:27 +0200)
hardware/saleae-logic16/api.c
hardware/saleae-logic16/protocol.c

index 130c579744e14196b1968b205a8d6e540e73fe63..388d95a53c20b5f3c05313ae923351425e97543b 100644 (file)
@@ -627,6 +627,9 @@ static int configure_channels(const struct sr_dev_inst *sdi)
        struct sr_channel *ch;
        GSList *l;
        uint16_t channel_bit;
+#ifdef WORDS_BIGENDIAN
+       int i;
+#endif
 
        devc = sdi->priv;
 
@@ -657,8 +660,7 @@ static int configure_channels(const struct sr_dev_inst *sdi)
                devc->unitsize = 2;
        } else {
 #ifdef WORDS_BIGENDIAN
-               int i;
-               for (i=0; i<devc->num_channels; i++)
+               for (i = 0; i < devc->num_channels; i++)
                        devc->channel_masks[i] >>= 8;
 #endif
                devc->unitsize = 1;
index 4a4aee125356acc2b71ec658ece2819ad8ff47a9..e2c5f88c98a561ccf16d494b2ce8ae0cfd611f73 100644 (file)
@@ -720,7 +720,7 @@ static size_t convert_sample_data(struct dev_context *devc,
                                  const uint8_t *src, size_t srccnt,
                                  int unitsize)
 {
-       return (unitsize == 2?
+       return (unitsize == 2 ?
                convert_sample_data_16(devc, dest, destcnt, src, srccnt) :
                convert_sample_data_8(devc, dest, destcnt, src, srccnt));
 }
@@ -790,7 +790,7 @@ SR_PRIV void logic16_receive_transfer(struct libusb_transfer *transfer)
                                transfer->actual_length, devc->unitsize);
 
        if (converted_length > 0) {
-               /* Cap sample count if needed */
+               /* Cap sample count if needed. */
                if (devc->limit_samples &&
                    (uint64_t)devc->num_samples + converted_length
                    > devc->limit_samples) {