mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-02 15:40:09 +01:00
Avoid case ranges in switch statement
Signed-off-by: Michael Forney <mforney@mforney.org>
This commit is contained in:
parent
9d1b43d241
commit
7160db054a
1 changed files with 7 additions and 6 deletions
13
src/quirks.c
13
src/quirks.c
|
|
@ -913,8 +913,13 @@ parse_file(struct quirks_context *ctx, const char *path)
|
|||
section = section_new(path, line);
|
||||
list_append(&ctx->sections, §ion->link);
|
||||
break;
|
||||
/* entries must start with A-Z */
|
||||
case 'A'...'Z':
|
||||
default:
|
||||
/* entries must start with A-Z */
|
||||
if (line[0] < 'A' && line[0] > 'Z') {
|
||||
qlog_parser(ctx, "%s:%d: Unexpected line %s\n",
|
||||
path, lineno, line);
|
||||
goto out;
|
||||
}
|
||||
switch (state) {
|
||||
case STATE_SECTION:
|
||||
qlog_parser(ctx, "%s:%d: expected [Section], got %s\n",
|
||||
|
|
@ -949,10 +954,6 @@ parse_file(struct quirks_context *ctx, const char *path)
|
|||
goto out;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
qlog_parser(ctx, "%s:%d: Unexpected line %s\n",
|
||||
path, lineno, line);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue