From: Uwe Hermann Date: Sat, 7 Apr 2012 15:40:52 +0000 (+0200) Subject: sr: sr_err() et. al. don't need trailing \n. X-Git-Tag: libsigrok-0.1.0~3 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0aeb0ccd5572a08c088e7903321a5998374f42e6;p=libsigrok.git sr: sr_err() et. al. don't need trailing \n. --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 73834203..342b2a4d 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -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; diff --git a/hardware/zeroplus-logic-cube/gl_usb.c b/hardware/zeroplus-logic-cube/gl_usb.c index 0156a3d1..52cafce8 100644 --- a/hardware/zeroplus-logic-cube/gl_usb.c +++ b/hardware/zeroplus-logic-cube/gl_usb.c @@ -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; } diff --git a/strutil.c b/strutil.c index 014c2c2c..f8a52918 100644 --- 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; }