Skip to content

Coverity fixes - #100

Merged
gvalkov merged 3 commits into
gvalkov:masterfrom
whot:master
Oct 14, 2018
Merged

Coverity fixes#100
gvalkov merged 3 commits into
gvalkov:masterfrom
whot:master

Conversation

@whot

@whot whot commented Oct 4, 2018

Copy link
Copy Markdown
Contributor

Nothing overly exciting, the first two are obvious. The third one is optional, if you don't like it because the only effect is to shut up coverity's false positive here feel free to skip that one.

whot added 3 commits October 5, 2018 08:42
If any of those ioctls fail, the returned data is undefined.
This is a false positive because the kernel does the right thing and takes
UINPUT_MAX_NAME_SIZE into account. But this shuts up coverity and other static
analyzers so I think we can live with a 79 character restriction instead of
80.

Also change to use sizeof(), not that it really makes a difference but it
allows for the array size to be changed while leaving the constant as-is,
impossible as that is.
@gvalkov
gvalkov merged commit 76b193d into gvalkov:master Oct 14, 2018
@gvalkov

gvalkov commented Oct 14, 2018

Copy link
Copy Markdown
Owner

Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants