]> sigrok.org Git - libsigrok.git/commitdiff
scpi: Remove redundant newline removal in sr_scpi_get_hw_id().
authorMartin Ling <redacted>
Fri, 17 Jan 2014 14:17:50 +0000 (14:17 +0000)
committerMartin Ling <redacted>
Mon, 20 Jan 2014 00:24:57 +0000 (00:24 +0000)
hardware/common/scpi.c

index 0a1e52e97ad01fcfc67fe2cbb9f8599b4feac134..fbf6d9bdbc8793c8d6d2b979a6d980384e6b9ba1 100644 (file)
@@ -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