← Commit list

da42bd5bb

Denis Vlasenko
Denis Vlasenko
2008-01-27
FAILED Duration: 21s

Subject

stty: fix mishandling of 'control' keywords (Ralf Friedl )

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 →

coreutils/stty.c+4 -20
@@ -780,30 +780,14 @@ static const struct suffix_mult stty_suffixes[] = {
static const struct mode_info *find_mode(const char *name)
{
- int i = 0;
- const char *m = mode_name;
-
- while (*m) {
- if (strcmp(name, m) == 0)
- return &mode_info[i];
- m += strlen(m) + 1;
- i++;
- }
- return NULL;
+ int i = index_in_strings(mode_name, name);
+ return i >= 0 ? &mode_info[i] : NULL;
}
static const struct control_info *find_control(const char *name)
{
- int i = 0;
- const char *m = mode_name;
-
- while (*m) {
- if (strcmp(name, m) == 0)
- return &control_info[i];
- m += strlen(m) + 1;
- i++;
- }
- return NULL;
+ int i = index_in_strings(control_name, name);
+ return i >= 0 ? &control_info[i] : NULL;
}
enum {