4 Jul
2024
4 Jul
'24
10:01 a.m.
Rémi Bernon (@rbernon) commented about dlls/windows.web/json_object.c:
static HRESULT WINAPI factory_ActivateInstance( IActivationFactory *iface, IInspectable **instance ) { - FIXME( "iface %p, instance %p stub!\n", iface, instance ); - return E_NOTIMPL; + struct json_object *impl; + + TRACE( "iface %p, instance %p.\n", iface, instance ); + + if (!(impl = calloc( 1, sizeof(*impl) ))) + { + *instance = NULL; + return E_OUTOFMEMORY; + }
Nit: this is often done like that to be shorter: ```suggestion:-4+0 *instance = NULL; if (!(impl = calloc( 1, sizeof(*impl) ))) return E_OUTOFMEMORY; ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5992#note_75114