← Commit list

0ee0b658b

Denys Vlasenko
Denys Vlasenko
2019-05-16
SUCCESS Duration: 197s

Subject

hush: small speedup in handle_changed_special_names()

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/hush.c+2 -2
@@ -2253,10 +2253,10 @@ static const char* FAST_FUNC get_local_var_value(const char *name)
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;
}