summaryrefslogtreecommitdiff
path: root/legacy/ecore
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2012-03-22 06:01:59 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-03-22 06:01:59 +0000
commit77a76443ec7faaddb3d29b8d60dd5065c835cbe0 (patch)
treeef25b51a74d6156e8665848e356af3b01f3e26f5 /legacy/ecore
parentf33084555fa5ccded6e5ec6179b49dc83c0cee8c (diff)
From: Vikram Narayanan <vikram186@gmail.com>
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. SVN revision: 69556
Diffstat (limited to '')
-rw-r--r--legacy/ecore/AUTHORS1
-rw-r--r--legacy/ecore/src/lib/ecore_fb/ecore_fb.c23
2 files changed, 11 insertions, 13 deletions
diff --git a/legacy/ecore/AUTHORS b/legacy/ecore/AUTHORS
index ebe354c817..3db7a4b24f 100644
--- a/legacy/ecore/AUTHORS
+++ b/legacy/ecore/AUTHORS
@@ -51,3 +51,4 @@ Bluezery <ohpowel@gmail.com>
51Doyoun Kang <wayofmine@gmail.com> <doyoun.kang@samsung.com> 51Doyoun Kang <wayofmine@gmail.com> <doyoun.kang@samsung.com>
52Haifeng Deng <haifeng.deng@samsung.com> 52Haifeng Deng <haifeng.deng@samsung.com>
53Jérémy Zurcher <jeremy@asynk.ch> 53Jérémy Zurcher <jeremy@asynk.ch>
54Vikram Narayanan <vikram186@gmail.com>
diff --git a/legacy/ecore/src/lib/ecore_fb/ecore_fb.c b/legacy/ecore/src/lib/ecore_fb/ecore_fb.c
index ca7d73d094..daeea0f8d9 100644
--- a/legacy/ecore/src/lib/ecore_fb/ecore_fb.c
+++ b/legacy/ecore/src/lib/ecore_fb/ecore_fb.c
@@ -92,21 +92,18 @@ _ecore_fb_size_get(int *w, int *h)
92 92
93 fb = open("/dev/fb0", O_RDWR); 93 fb = open("/dev/fb0", O_RDWR);
94 if (fb < 0) 94 if (fb < 0)
95 { 95 goto exit;
96 if (w) *w = 0; 96
97 if (h) *h = 0;
98 return;
99 }
100 if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1) 97 if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1)
101 { 98 goto err_ioctl;
102 if (w) *w = 0; 99
103 if (h) *h = 0; 100 *w = fb_var.xres;
104 close(fb); 101 *h = fb_var.yres;
105 return; 102
106 } 103err_ioctl:
107 close(fb); 104 close(fb);
108 if (w) *w = fb_var.xres; 105exit:
109 if (h) *h = fb_var.yres; 106 return;
110} 107}
111 108
112/** 109/**