From: raster Date: Thu, 22 Mar 2012 06:01:59 +0000 (+0000) Subject: From: Vikram Narayanan X-Git-Tag: 2.0_alpha~47^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6da056bfe347a8270c2e1fcad85ea0c6833d0936;p=framework%2Fuifw%2Fecore.git From: Vikram Narayanan Subject: [E-devel] [PATCH] ecore/ecore_fb: Tweaks in _ecore_fb_size_get As the width and height are defined as static, no need to initialize it again to zero. Also removed checks for 'valid pointers' as it is redundant. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@69556 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/AUTHORS b/AUTHORS index ebe354c..3db7a4b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -51,3 +51,4 @@ Bluezery Doyoun Kang Haifeng Deng Jérémy Zurcher +Vikram Narayanan diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c index ca7d73d..daeea0f 100644 --- a/src/lib/ecore_fb/ecore_fb.c +++ b/src/lib/ecore_fb/ecore_fb.c @@ -92,21 +92,18 @@ _ecore_fb_size_get(int *w, int *h) fb = open("/dev/fb0", O_RDWR); if (fb < 0) - { - if (w) *w = 0; - if (h) *h = 0; - return; - } + goto exit; + if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1) - { - if (w) *w = 0; - if (h) *h = 0; - close(fb); - return; - } + goto err_ioctl; + + *w = fb_var.xres; + *h = fb_var.yres; + +err_ioctl: close(fb); - if (w) *w = fb_var.xres; - if (h) *h = fb_var.yres; +exit: + return; } /**