summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-08-11 03:02:30 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-11 17:59:09 +0200
commita67ef278e24b1fe5ab8f5e8ef27f9654b91732de (patch)
treedbef61c3226194d95c93105ccb1a83774e74776e /drivers/video/fbmem.c
parentfbcon: uninline four foo_update_attr() functions (diff)
downloadlinux-a67ef278e24b1fe5ab8f5e8ef27f9654b91732de.tar.xz
linux-a67ef278e24b1fe5ab8f5e8ef27f9654b91732de.zip
drivers/video/fbmem.c: simplify strlen()==0 check in fb_get_options()
Replaced !strlen(str) check with !str[0]. Removed the variable which was used solely to store strlen result. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 731fce64df9d..a8500c61bb16 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1786,7 +1786,7 @@ static int ofonly __read_mostly;
int fb_get_options(char *name, char **option)
{
char *opt, *options = NULL;
- int opt_len, retval = 0;
+ int retval = 0;
int name_len = strlen(name), i;
if (name_len && ofonly && strncmp(name, "offb", 4))
@@ -1796,8 +1796,7 @@ int fb_get_options(char *name, char **option)
for (i = 0; i < FB_MAX; i++) {
if (video_options[i] == NULL)
continue;
- opt_len = strlen(video_options[i]);
- if (!opt_len)
+ if (!video_options[i][0])
continue;
opt = video_options[i];
if (!strncmp(name, opt, name_len) &&