From: Henri Verbeet Subject: Re: [PATCH] wined3d: Use NULL instead of casting 0 Message-Id: Date: Sat, 8 Dec 2018 00:38:26 +0330 In-Reply-To: <20181207205717.11320-3-mstefani@winehq.org> References: <20181207205717.11320-3-mstefani@winehq.org> On Sat, 8 Dec 2018 at 00:28, Michael Stefaniuc wrote: > GL_EXTCALL(glBindBuffer(GL_QUERY_BUFFER, query->buffer_object)); > /* Read the same value twice. We know we have the result if map_ptr[0] == map_ptr[1]. */ > - GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, (void *)0)); > + GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, NULL)); > GL_EXTCALL(glGetQueryObjectui64v(id, GL_QUERY_RESULT, (void *)sizeof(query->map_ptr[0]))); > GL_EXTCALL(glBindBuffer(GL_QUERY_BUFFER, 0)); I don't think that really makes it better. The code is passing the offset 0 through a pointer typed parameter (because, OpenGL), much like the line below it passes a different offset through the same parameter.