]> sigrok.org Git - libsigrok.git/blobdiff - src/input/input.c
lcr/vc4080: introduce LCR packet parser for Voltcraft 4080 (and PeakTech 2165)
[libsigrok.git] / src / input / input.c
index 4d3eb9856744271879f2f93fc866c7ddbad6c07b..282084cab008332593cab865a1e5ad987138a075 100644 (file)
@@ -582,8 +582,10 @@ SR_API struct sr_dev_inst *sr_input_dev_inst_get(const struct sr_input *in)
  */
 SR_API int sr_input_send(const struct sr_input *in, GString *buf)
 {
-       sr_spew("Sending %" G_GSIZE_FORMAT " bytes to %s module.",
-               buf->len, in->module->id);
+       size_t len;
+
+       len = buf ? buf->len : 0;
+       sr_spew("Sending %zu bytes to %s module.", len, in->module->id);
        return in->module->receive((struct sr_input *)in, buf);
 }