From 1777b4424cc95be0e25f3dc45694aaf953b6baed Mon Sep 17 00:00:00 2001 From: Maas-Maarten Zeeman Date: Mon, 24 Jan 2022 10:44:45 +0100 Subject: [PATCH] Small refactor --- c_src/esqlite3_nif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c_src/esqlite3_nif.c b/c_src/esqlite3_nif.c index 433aeef..cc92da5 100644 --- a/c_src/esqlite3_nif.c +++ b/c_src/esqlite3_nif.c @@ -202,7 +202,7 @@ command_create() { esqlite_command *cmd = (esqlite_command *) enif_alloc(sizeof(esqlite_command)); if(cmd == NULL) - return NULL; + return NULL; cmd->env = enif_alloc_env(); if(cmd->env == NULL) { @@ -304,11 +304,11 @@ update_callback(void *arg, int sqlite_operation_type, char const *sqlite_databas esqlite_connection *db = (esqlite_connection *)arg; esqlite_command *cmd = NULL; ERL_NIF_TERM type, table, rowid; - cmd = command_create(); if(db == NULL) return; + cmd = command_create(); if(!cmd) return;