]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/sysclk-lwla/protocol.c
Various #include file cosmetic fixes.
[libsigrok.git] / src / hardware / sysclk-lwla / protocol.c
index 2fd4dffaa48bd46267d21d6dad3d57aae4b98bf6..a8659a6b04082d98ba0801f72eff555c2fed3947 100644 (file)
@@ -17,8 +17,8 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "protocol.h"
 #include <string.h>
+#include "protocol.h"
 
 /* Bit mask for the RLE repeat-count-follows flag. */
 #define RLE_FLAG_LEN_FOLLOWS ((uint64_t)1 << 35)
@@ -959,11 +959,7 @@ SR_PRIV struct acquisition_state *lwla_alloc_acquisition_state(void)
 {
        struct acquisition_state *acq;
 
-       acq = g_try_new0(struct acquisition_state, 1);
-       if (!acq) {
-               sr_err("Acquisition state malloc failed.");
-               return NULL;
-       }
+       acq = g_malloc0(sizeof(struct acquisition_state));
 
        acq->xfer_in = libusb_alloc_transfer(0);
        if (!acq->xfer_in) {