From: Martin Ling Date: Fri, 17 Jan 2014 14:17:50 +0000 (+0000) Subject: scpi: Remove redundant newline removal in sr_scpi_get_hw_id(). X-Git-Tag: libsigrok-0.3.0~235 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=7788579e66d1bb7b3db8d3360c11f6407f596fee;p=libsigrok.git scpi: Remove redundant newline removal in sr_scpi_get_hw_id(). --- diff --git a/hardware/common/scpi.c b/hardware/common/scpi.c index 0a1e52e9..fbf6d9bd 100644 --- a/hardware/common/scpi.c +++ b/hardware/common/scpi.c @@ -604,7 +604,6 @@ SR_PRIV int sr_scpi_get_hw_id(struct sr_scpi_dev_inst *scpi, { int num_tokens; char *response; - char *newline; gchar **tokens; struct sr_scpi_hw_info *hw_info; @@ -617,10 +616,6 @@ SR_PRIV int sr_scpi_get_hw_id(struct sr_scpi_dev_inst *scpi, sr_info("Got IDN string: '%s'", response); - /* Remove trailing newline if present. */ - if ((newline = g_strrstr(response, "\n"))) - newline[0] = '\0'; - /* * The response to a '*IDN?' is specified by the SCPI spec. It contains * a comma-separated list containing the manufacturer name, instrument