Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
libinput
libinput
Commits
7160db05
Commit
7160db05
authored
Jun 15, 2019
by
Michael Forney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid case ranges in switch statement
Signed-off-by:
Michael Forney
<
mforney@mforney.org
>
parent
9d1b43d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/quirks.c
src/quirks.c
+7
-6
No files found.
src/quirks.c
View file @
7160db05
...
...
@@ -913,8 +913,13 @@ parse_file(struct quirks_context *ctx, const char *path)
section
=
section_new
(
path
,
line
);
list_append
(
&
ctx
->
sections
,
&
section
->
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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment