]> sigrok.org Git - libsigrok.git/commitdiff
sr: sr_err() et. al. don't need trailing \n.
authorUwe Hermann <redacted>
Sat, 7 Apr 2012 15:40:52 +0000 (17:40 +0200)
committerUwe Hermann <redacted>
Tue, 10 Apr 2012 21:25:57 +0000 (23:25 +0200)
hardware/asix-sigma/asix-sigma.c
hardware/zeroplus-logic-cube/gl_usb.c
strutil.c

index 73834203fa4ad4b8207cd0edeca3cc15bd3b1039..342b2a4da2a57775a2d0ba77f12bcaa49d37d0a9 100644 (file)
@@ -147,7 +147,7 @@ static int sigma_write(void *buf, size_t size, struct context *ctx)
                sr_err("sigma: ftdi_write_data failed: %s",
                       ftdi_get_error_string(&ctx->ftdic));
        } else if ((size_t) ret != size) {
-               sr_err("sigma: ftdi_write_data did not complete write\n");
+               sr_err("sigma: ftdi_write_data did not complete write.");
        }
 
        return ret;
@@ -382,7 +382,7 @@ static int bin2bitbang(const char *filename,
                g_free(compressed_buf);
                g_free(firmware);
                sr_err("sigma: Could not unpack Sigma firmware. "
-                      "(Error %d)\n", ret);
+                      "(Error %d).", ret);
                return SR_ERR;
        }
 
@@ -411,7 +411,7 @@ static int bin2bitbang(const char *filename,
        if (offset != *buf_size) {
                g_free(*buf);
                sr_err("sigma: Error reading firmware %s "
-                      "offset=%ld, file_size=%ld, buf_size=%zd\n",
+                      "offset=%ld, file_size=%ld, buf_size=%zd.",
                       filename, offset, file_size, *buf_size);
 
                return SR_ERR;
index 0156a3d19f0ed72930079a816d3c5ffe147947a5..52cafce880a95aebaf5a228a6917142a378740c6 100644 (file)
@@ -58,7 +58,7 @@ static int gl_write_address(libusb_device_handle *devh, unsigned int address)
        ret = libusb_control_transfer(devh, CTRL_OUT, 0xc, REQ_WRITEADDR,
                                         0, packet, 1, TIMEOUT);
        if (ret != 1)
-               sr_err("zp: %s: libusb_control_transfer returned %d\n",
+               sr_err("zp: %s: libusb_control_transfer returned %d.",
                       __func__, ret);
        return ret;
 }
@@ -71,7 +71,7 @@ static int gl_write_data(libusb_device_handle *devh, unsigned int val)
        ret = libusb_control_transfer(devh, CTRL_OUT, 0xc, REQ_WRITEDATA,
                                      0, packet, 1, TIMEOUT);
        if (ret != 1)
-               sr_err("zp: %s: libusb_control_transfer returned %d\n",
+               sr_err("zp: %s: libusb_control_transfer returned %d.",
                       __func__, ret);
        return ret;
 }
@@ -85,7 +85,7 @@ static int gl_read_data(libusb_device_handle *devh)
                                      0, packet, 1, TIMEOUT);
        if (ret != 1)
                sr_err("zp: %s: libusb_control_transfer returned %d, "
-                      "val=%hhx\n", __func__, ret, packet[0]);
+                      "val=%hhx.", __func__, ret, packet[0]);
        return (ret == 1) ? packet[0] : ret;
 }
 
@@ -100,13 +100,13 @@ SR_PRIV int gl_read_bulk(libusb_device_handle *devh, void *buffer,
        ret = libusb_control_transfer(devh, CTRL_OUT, 0x4, REQ_READBULK,
                                      0, packet, 8, TIMEOUT);
        if (ret != 8)
-               sr_err("zp: %s: libusb_control_transfer returned %d\n",
+               sr_err("zp: %s: libusb_control_transfer returned %d.",
                       __func__, ret);
 
        ret = libusb_bulk_transfer(devh, EP1_BULK_IN, buffer, size,
                                   &transferred, TIMEOUT);
        if (ret < 0)
-               sr_err("zp: Bulk read error %d\n", ret);
+               sr_err("zp: Bulk read error %d.", ret);
        return transferred;
 }
 
index 014c2c2ce16538dbacc1d72bd7276fb73f9c04c1..f8a52918deee38adef0217760a16dcd5ceabb456 100644 (file)
--- a/strutil.c
+++ b/strutil.c
@@ -175,7 +175,7 @@ SR_API char **sr_parse_triggerstring(struct sr_dev *dev,
                }
 
                if (probenum < 1 || probenum > max_probes) {
-                       sr_err("strutil: Invalid probe (%d).\n", probenum);
+                       sr_err("strutil: Invalid probe (%d).", probenum);
                        error = TRUE;
                        break;
                }
@@ -184,7 +184,7 @@ SR_API char **sr_parse_triggerstring(struct sr_dev *dev,
                        for (tc = ++trigger; *tc; tc++) {
                                if (strchr(trigger_types, *tc) == NULL) {
                                        sr_err("strutil: Unsupported trigger "
-                                              "type '%c'.\n", *tc);
+                                              "type '%c'.", *tc);
                                        error = TRUE;
                                        break;
                                }