{
char buf[LINELEN_MAX];
int stat;
- const char* ptr;
struct dev_context* devc;
devc = (struct dev_context*)sdi->priv;
return SR_ERR;
}
- /* Jump across leading zeros to prevent sr_atoi() believing this to be octal. */
- for (ptr = buf; isspace(*buf) || (*ptr == '0'); ptr++)
- ;
-
- if (sr_atoi(ptr, &stat) != SR_OK)
+ if (sr_atoi(buf, &stat) != SR_OK)
return SR_ERR;
return lps_process_status(sdi, stat);
/** Scan for LPS-300 series device.
*/
-static GSList *doScan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *options)
+static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *options)
{
struct sr_dev_inst *sdi;
struct drv_context *drvc;
/** Scan for LPS-301 device. */
static GSList *scan_lps301(GSList *options)
{
- return doScan(LPS_301, &motech_lps_301_driver_info, options);
+ return do_scan(LPS_301, &motech_lps_301_driver_info, options);
}
static GSList *doDevList(struct sr_dev_driver *drv)
struct sr_dev_inst *sdi;
struct dev_context *devc;
struct sr_serial_dev_inst *serial;
- // char achar;
int len;
gdouble elapsed_s;
continue;
}
- // achar = *(devc->buf + devc->buflen);
- // sr_spew("read 0x%02x/%d/'%c'", achar, achar, achar);
-
devc->buflen += len;
devc->buf[devc->buflen] = '\0';