hush: small speedup in handle_changed_special_names()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/shell/hush.c b/shell/hush.c
index a103e81..ce34163 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2253,10 +2253,10 @@
static void handle_changed_special_names(const char *name, unsigned name_len)
{
if (ENABLE_HUSH_INTERACTIVE && ENABLE_FEATURE_EDITING_FANCY_PROMPT
- && G_interactive_fd
&& name_len == 3 && name[0] == 'P' && name[1] == 'S'
) {
- cmdedit_update_prompt();
+ if (G_interactive_fd)
+ cmdedit_update_prompt();
return;
}