]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/beaglelogic/api.c
Consistently use g_malloc0() for allocating devc.
[libsigrok.git] / src / hardware / beaglelogic / api.c
index 9a39e1de9487ec735f82231f5e25bf7866725eb0..a703adf351cd2e1a1e875dc93d90b646f77ec7fe 100644 (file)
@@ -65,12 +65,11 @@ static int init(struct sr_context *sr_ctx)
        return std_init(sr_ctx, di, LOG_PREFIX);
 }
 
-static struct dev_context * beaglelogic_devc_alloc(void)
+static struct dev_context *beaglelogic_devc_alloc(void)
 {
        struct dev_context *devc;
 
-       /* Allocate zeroed structure */
-       devc = g_try_malloc0(sizeof(*devc));
+       devc = g_malloc0(sizeof(struct dev_context));
 
        /* Default non-zero values (if any) */
        devc->fd = -1;