From f315b508aeda7cf12cdbed7d49ec1a9cbf84a8e3 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Tue, 3 Dec 2013 16:11:00 +0000 Subject: [PATCH] Reduce nesting level. --- grub-core/normal/menu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index fa85c3533..b47991aba 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -110,10 +110,12 @@ get_timeout_style (void) struct timeout_style_name *style_name; val = grub_env_get ("timeout_style"); - if (val) - for (style_name = timeout_style_names; style_name->name; style_name++) - if (grub_strcmp (style_name->name, val) == 0) - return style_name->style; + if (!val) + return TIMEOUT_STYLE_MENU; + + for (style_name = timeout_style_names; style_name->name; style_name++) + if (grub_strcmp (style_name->name, val) == 0) + return style_name->style; return TIMEOUT_STYLE_MENU; }