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 1D6C326138 for ; Thu, 14 Jun 2018 12:12:50 -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 WIsR-GLo734L for ; Thu, 14 Jun 2018 12:12:50 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 CD22620341 for ; Thu, 14 Jun 2018 12:12:49 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 05/11] box: port schema_find_id to C References: From: Kirill Shcherbatov Message-ID: Date: Thu, 14 Jun 2018 19:12:47 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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" > 1. You should not apply my diff as is with no inspection. Usually > I do draft fixes in review. Here is the bug - on return -1 > the iterator and region leaks. This time apply this: - return -1; + rc = -1; > 2. Same as on the previous review: this function searches not only > space id, but a system object id. /** - * Find space id by name in specified system space with index. + * Find object id by name in specified system space with index. * - * @param system_space_id identifier of the system space. + * @param system_space_id identifier of the system object. * @param index_id identifier of the index to lookup. * @param name of object to lookup. * @param len length of a name. > 3. Invalid alignment@@ -115,8 +115,8 @@ sequence_by_id(uint32_t id); * @retval -1 on error. */ int -schema_find_id(uint32_t system_space_id, uint32_t index_id, - const char *name, uint32_t len, uint32_t *object_id); +schema_find_id(uint32_t system_space_id, uint32_t index_id, const char *name, + uint32_t len, uint32_t *object_id);