[PATCH wayland v3 03/10] connection: Refactor out closure allocation
daniel at fooishbar.org
Wed Dec 27 14:13:49 UTC 2017
On 27 December 2017 at 14:08, Daniel Stone <daniel at fooishbar.org> wrote:
> On 6 December 2017 at 17:22, Derek Foreman <derekf at osg.samsung.com> wrote:
>> Moves the common/similar bits into one place.
>> This has a minor functional change - count and message are now initialized
>> immediately, previously they'd only be set if (de)marshal was successful.
> I've reviewed this does what it says on the box, and the outcome is
> correct, so I'm going to land it. But as a drive-by, you could get rid
> of some of the local variables like 'count = closure->count', so it's
> a little more clear to the casual reader what's going on.
The other thing I forgot to mention here, is that you could move the
wl_connection_consume bits up earlier, rather than doing it
immediately before return in both success/failure branches.
More information about the wayland-devel