X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmotech-lps-30x%2Fprotocol.c;h=c7f65e1001fc33b5015febadbaf9f2f428f1557d;hb=6433156c3275df933e4bf6dcfb020c91fca0ae86;hp=6daa5d9ffe6087fe2b8edd525bfd3bc2bf4abf79;hpb=dc89faeace016d0fbd8314937d0335a2ae76de14;p=libsigrok.git diff --git a/src/hardware/motech-lps-30x/protocol.c b/src/hardware/motech-lps-30x/protocol.c index 6daa5d9f..c7f65e10 100644 --- a/src/hardware/motech-lps-30x/protocol.c +++ b/src/hardware/motech-lps-30x/protocol.c @@ -82,14 +82,14 @@ static void process_line(struct sr_dev_inst *sdi) case AQ_I2: if (sr_atod(devc->buf, &dbl) != SR_OK) { sr_err("Failed to convert '%s' to double, errno=%d %s", - devc->buf, errno, strerror(errno)); + devc->buf, errno, g_strerror(errno)); dbl = 0.0; } break; case AQ_STATUS: if (sr_atoi(devc->buf, &auxint) != SR_OK) { sr_err("Failed to convert '%s' to int, errno=%d %s", - devc->buf, errno, strerror(errno)); + devc->buf, errno, g_strerror(errno)); auxint = 0; } break; @@ -193,9 +193,10 @@ SR_PRIV int motech_lps_30x_receive_data(int fd, int revents, void *cb_data) return TRUE; if (devc->acq_req_pending) { - gint64 elapsed_us = g_get_monotonic_time() - devc->req_sent_at; + int64_t elapsed_us = g_get_monotonic_time() - devc->req_sent_at; if (elapsed_us > (REQ_TIMEOUT_MS * 1000)) { - sr_spew("Request timeout: req=%d t=%lldus", (int)devc->acq_req, elapsed_us); + sr_spew("Request timeout: req=%d t=%" PRIi64 "us", + (int)devc->acq_req, elapsed_us); devc->acq_req_pending = 0; } }