]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fluke-dmm/fluke.c
Build: Set local include directories in Makefile.am
[libsigrok.git] / src / hardware / fluke-dmm / fluke.c
index c098ced465a351f384db2fbb8eb1da5b60165325..7604afa9a473a41d01497385a2bbb8340ec19f8f 100644 (file)
@@ -20,9 +20,8 @@
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
-#include <errno.h>
 #include <glib.h>
-#include "libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 #include "fluke-dmm.h"
 
@@ -59,10 +58,8 @@ static struct sr_datafeed_analog *handle_qm_18x(const struct sr_dev_inst *sdi,
        while (*e && *e == ' ')
                e++;
 
-       if (!(analog = g_try_malloc0(sizeof(struct sr_datafeed_analog))))
-               return NULL;
-       if (!(analog->data = g_try_malloc(sizeof(float))))
-               return NULL;
+       analog = g_malloc0(sizeof(struct sr_datafeed_analog));
+       analog->data = g_malloc(sizeof(float));
        analog->channels = sdi->channels;
        analog->num_samples = 1;
        if (is_oor)
@@ -170,10 +167,8 @@ static struct sr_datafeed_analog *handle_qm_28x(const struct sr_dev_inst *sdi,
                return NULL;
        }
 
-       if (!(analog = g_try_malloc0(sizeof(struct sr_datafeed_analog))))
-               return NULL;
-       if (!(analog->data = g_try_malloc(sizeof(float))))
-               return NULL;
+       analog = g_malloc0(sizeof(struct sr_datafeed_analog));
+       analog->data = g_malloc(sizeof(float));
        analog->channels = sdi->channels;
        analog->num_samples = 1;
        *analog->data = fvalue;