From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 471F646970E for ; Fri, 17 Jan 2020 10:47:58 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id q8so1657620ljj.11 for ; Thu, 16 Jan 2020 23:47:58 -0800 (PST) Date: Fri, 17 Jan 2020 10:47:56 +0300 From: Konstantin Osipov Message-ID: <20200117074756.GG24940@atlas> References: <31e884f2b6d2ab7b222229f1b204fa067d63ae65.1579211601.git.v.shpilevoy@tarantool.org> <20200116220033.GO31598@uranus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200116220033.GO31598@uranus> Subject: Re: [Tarantool-patches] [PATCH v2 2/3] fiber: destroy fiber.storage created by iproto List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy * Cyrill Gorcunov [20/01/17 01:02]: > On Thu, Jan 16, 2020 at 10:54:22PM +0100, Vladislav Shpilevoy wrote: > ... > > static int > > lbox_fiber_storage(struct lua_State *L) > > { > > struct fiber *f = lbox_checkfiber(L, 1); > > int storage_ref = f->storage.lua.ref; > > if (storage_ref <= 0) { > > + struct trigger *t = (struct trigger *) > > + malloc(sizeof(*t)); > > Vlad, maybe you could point me -- why do we need an explicit cast here? It's a C++ habit, where void * is not implicitly cast-able to any type. -- Konstantin Osipov, Moscow, Russia