sr: sr_err() et. al. don't need trailing \n.

This commit is contained in:
Uwe Hermann 2012-04-07 17:40:52 +02:00
parent bf978d3553
commit 0aeb0ccd55
3 changed files with 10 additions and 10 deletions

View 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", sr_err("sigma: ftdi_write_data failed: %s",
ftdi_get_error_string(&ctx->ftdic)); ftdi_get_error_string(&ctx->ftdic));
} else if ((size_t) ret != size) { } 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; return ret;
@ -382,7 +382,7 @@ static int bin2bitbang(const char *filename,
g_free(compressed_buf); g_free(compressed_buf);
g_free(firmware); g_free(firmware);
sr_err("sigma: Could not unpack Sigma firmware. " sr_err("sigma: Could not unpack Sigma firmware. "
"(Error %d)\n", ret); "(Error %d).", ret);
return SR_ERR; return SR_ERR;
} }
@ -411,7 +411,7 @@ static int bin2bitbang(const char *filename,
if (offset != *buf_size) { if (offset != *buf_size) {
g_free(*buf); g_free(*buf);
sr_err("sigma: Error reading firmware %s " 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); filename, offset, file_size, *buf_size);
return SR_ERR; return SR_ERR;

View 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, ret = libusb_control_transfer(devh, CTRL_OUT, 0xc, REQ_WRITEADDR,
0, packet, 1, TIMEOUT); 0, packet, 1, TIMEOUT);
if (ret != 1) if (ret != 1)
sr_err("zp: %s: libusb_control_transfer returned %d\n", sr_err("zp: %s: libusb_control_transfer returned %d.",
__func__, ret); __func__, ret);
return 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, ret = libusb_control_transfer(devh, CTRL_OUT, 0xc, REQ_WRITEDATA,
0, packet, 1, TIMEOUT); 0, packet, 1, TIMEOUT);
if (ret != 1) if (ret != 1)
sr_err("zp: %s: libusb_control_transfer returned %d\n", sr_err("zp: %s: libusb_control_transfer returned %d.",
__func__, ret); __func__, ret);
return ret; return ret;
} }
@ -85,7 +85,7 @@ static int gl_read_data(libusb_device_handle *devh)
0, packet, 1, TIMEOUT); 0, packet, 1, TIMEOUT);
if (ret != 1) if (ret != 1)
sr_err("zp: %s: libusb_control_transfer returned %d, " 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; 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, ret = libusb_control_transfer(devh, CTRL_OUT, 0x4, REQ_READBULK,
0, packet, 8, TIMEOUT); 0, packet, 8, TIMEOUT);
if (ret != 8) if (ret != 8)
sr_err("zp: %s: libusb_control_transfer returned %d\n", sr_err("zp: %s: libusb_control_transfer returned %d.",
__func__, ret); __func__, ret);
ret = libusb_bulk_transfer(devh, EP1_BULK_IN, buffer, size, ret = libusb_bulk_transfer(devh, EP1_BULK_IN, buffer, size,
&transferred, TIMEOUT); &transferred, TIMEOUT);
if (ret < 0) if (ret < 0)
sr_err("zp: Bulk read error %d\n", ret); sr_err("zp: Bulk read error %d.", ret);
return transferred; return transferred;
} }

View File

@ -175,7 +175,7 @@ SR_API char **sr_parse_triggerstring(struct sr_dev *dev,
} }
if (probenum < 1 || probenum > max_probes) { if (probenum < 1 || probenum > max_probes) {
sr_err("strutil: Invalid probe (%d).\n", probenum); sr_err("strutil: Invalid probe (%d).", probenum);
error = TRUE; error = TRUE;
break; break;
} }
@ -184,7 +184,7 @@ SR_API char **sr_parse_triggerstring(struct sr_dev *dev,
for (tc = ++trigger; *tc; tc++) { for (tc = ++trigger; *tc; tc++) {
if (strchr(trigger_types, *tc) == NULL) { if (strchr(trigger_types, *tc) == NULL) {
sr_err("strutil: Unsupported trigger " sr_err("strutil: Unsupported trigger "
"type '%c'.\n", *tc); "type '%c'.", *tc);
error = TRUE; error = TRUE;
break; break;
} }