Rémi Bernon (@rbernon) commented about dlls/winewayland.drv/opengl.c:
+DECL_FUNCPTR(eglInitialize); +#undef DECL_FUNCPTR
+static void* load_symbol(void *handle, const char *symbol) +{
- void *addr;
- if (!(addr = dlsym(handle, symbol))) addr = p_eglGetProcAddress(symbol);
- return addr;
+}
+static void init_opengl(void) +{
- if (!(egl_handle = dlopen(SONAME_LIBEGL, RTLD_NOW|RTLD_GLOBAL)))
- {
ERR("Failed to load %s: %s\n", SONAME_LIBEGL, dlerror());
goto err;
You can just return here, would save an if in the error path.