[waffle] [PATCH 2/2] gbm: coding style cleanup
Emil Velikov
emil.l.velikov at gmail.com
Thu Jul 21 10:56:08 UTC 2016
Waffle aims to keep the main code path in it's core, with the
error path diverging via goto labels and alike.
Follow the approach and update the gbm code.
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/waffle/gbm/wgbm_platform.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/waffle/gbm/wgbm_platform.c b/src/waffle/gbm/wgbm_platform.c
index 0fc0352..9ba1340 100644
--- a/src/waffle/gbm/wgbm_platform.c
+++ b/src/waffle/gbm/wgbm_platform.c
@@ -137,11 +137,11 @@ wgbm_platform_create(void)
if (self == NULL)
return NULL;
- if (wgbm_platform_init(self))
- return &self->wegl.wcore;
-
- wgbm_platform_destroy(&self->wegl.wcore);
- return NULL;
+ if (!wgbm_platform_init(self)) {
+ wgbm_platform_destroy(&self->wegl.wcore);
+ return NULL;
+ }
+ return &self->wegl.wcore;
}
bool
--
2.9.0
More information about the waffle
mailing list