From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 79BD026EE5 for ; Mon, 19 Aug 2019 10:49:39 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r5HfNpPtD40X for ; Mon, 19 Aug 2019 10:49:39 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 234EF26EE1 for ; Mon, 19 Aug 2019 10:49:39 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH 1/2] Do not log error in engine_find() Date: Mon, 19 Aug 2019 17:49:33 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, kostja@tarantool.org, Nikita Pettik Error logging in engine_find() seems to be redundant: error message is displayed twice (since its callers always push error on the top). Let's remove this duplication. --- src/box/engine.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/box/engine.h b/src/box/engine.h index a302b3bca..ef694da00 100644 --- a/src/box/engine.h +++ b/src/box/engine.h @@ -235,10 +235,8 @@ static inline struct engine * engine_find(const char *name) { struct engine *engine = engine_by_name(name); - if (engine == NULL) { + if (engine == NULL) diag_set(ClientError, ER_NO_SUCH_ENGINE, name); - diag_log(); - } return engine; } -- 2.15.1