Found by Clang scan-build.
pool_t pool = pool_alloconly_create(MEMPOOL_GROWING"lua userdb iterate", 128);
struct auth_lua_userdb_iterate_context *actx =
p_new(pool, struct auth_lua_userdb_iterate_context, 1);
- int ret;
actx->pool = pool;
actx->ctx.auth_request = req;
e_debug(authdb_event(req), "Calling %s", AUTH_LUA_USERDB_ITERATE);
- if ((ret = lua_pcall(script->L, 0, 1, 0)) != 0) {
+ if (lua_pcall(script->L, 0, 1, 0) != 0) {
e_error(authdb_event(req),
"db-lua: " AUTH_LUA_USERDB_ITERATE " failed: %s",
lua_tostring(script->L, -1));
static void connect_callback(CassFuture *future, void *context)
{
struct cassandra_db *db = context;
- CassError rc;
- if ((rc = cass_future_error_code(future)) != CASS_OK) {
+ if (cass_future_error_code(future) != CASS_OK) {
driver_cassandra_log_error(db, future,
"Couldn't connect to Cassandra");
driver_cassandra_close(db, "Couldn't connect to Cassandra");
if (!wrapper_ostream_is_empty(wostream) &&
(!stream->corked || wrapper_ostream_is_filled(wostream)) &&
wrapper_ostream_send_prepare(wostream, size) &&
- (ret = wrapper_ostream_flush_buffer(wostream)) < 0)
+ wrapper_ostream_flush_buffer(wostream) < 0)
return -1;
if (!stream->corked && wrapper_ostream_is_full(wostream)) {
{
struct mail_lua_user_context *luser = MAIL_LUA_USER_CONTEXT(user);
const char *error;
- int ret;
if (luser == NULL)
return;
- if ((ret = mail_lua_call_hook(luser->script, user, MAIL_LUA_USER_DEINIT_PRE_FN,
- &error)) < 0) {
+ if (mail_lua_call_hook(luser->script, user, MAIL_LUA_USER_DEINIT_PRE_FN,
+ &error) < 0) {
e_error(user->event, "mail-lua: %s", error);
}
{
struct mail_lua_user_context *luser = MAIL_LUA_USER_CONTEXT(user);
const char *error;
- int ret;
if (luser == NULL)
return;
luser->module_ctx.super.deinit(user);
- if ((ret = mail_lua_call_hook(luser->script, user, MAIL_LUA_USER_DEINIT_FN,
- &error)) < 0) {
+ if (mail_lua_call_hook(luser->script, user, MAIL_LUA_USER_DEINIT_FN,
+ &error) < 0) {
e_error(user->event, "mail-lua: %s", error);
}
size_t value_len)
{
const char *error;
- int ret;
/* reformat key */
if ((key = lua_storage_mail_user_metadata_key(key)) == NULL) {
"Cannot open INBOX: %s", error);
}
- if ((ret = lua_storage_mailbox_attribute_set(mbox, key, value,
- value_len, &error)) < 0) {
+ if (lua_storage_mailbox_attribute_set(mbox, key, value, value_len,
+ &error) < 0) {
mailbox_free(&mbox);
return luaL_error(script->L,
"Cannot get attribute: %s", error);
event_set_name(event, DLUA_CALL_FINISHED);
event_add_str(event, "function_name", DLUA_FN_BEGIN_TXN);
- int luaerr;
-
/* Start txn and store whatever LUA gives us back, it's our txid */
lua_getglobal(ctx->script->L, DLUA_FN_BEGIN_TXN);
if (!lua_isfunction(ctx->script->L, -1)) {
/* Push mail user as argument */
dlua_push_mail_user(ctx->script, user);
- if ((luaerr = lua_pcall(ctx->script->L, 1, 1, 0)) != 0) {
+ if (lua_pcall(ctx->script->L, 1, 1, 0) != 0) {
const char *error = lua_tostring(ctx->script->L, -1);
event_add_str(event, "error", error);
e_error(event, "%s", error);
const struct push_notification_txn_mbox *mbox,
struct push_notification_txn_msg *msg)
{
- int luaerr;
const char *fn =
push_notification_driver_lua_to_fn(event->event->event->name);
struct event *e = event_create(ctx->event);
i_unreached();
/* Perform call */
- if ((luaerr = lua_pcall(ctx->script->L, 2, 0, 0)) != 0) {
+ if (lua_pcall(ctx->script->L, 2, 0, 0) != 0) {
const char *error = lua_tostring(ctx->script->L, -1);
event_add_str(e, "error", error);
e_error(e, "%s", error);