Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A number of cleanup patches #755

Merged
merged 8 commits into from
Aug 19, 2024
Merged

A number of cleanup patches #755

merged 8 commits into from
Aug 19, 2024

Conversation

whot
Copy link
Member

@whot whot commented Aug 15, 2024

Prep work for other patches, might as well get those out

whot added 8 commits August 15, 2024 11:50
Instead of the deprecated `meson builddir`
We could move this into the respective default: case of the switch
statement below but then we won't get compiler warnings about missing
enum values. So let's add this to have a clean scan-build output.
Instead of duplicating the code here build the default Styli= entry and
parse it as if it were set by the tablet file.
Ensure the memcmp works on the array element size without having to
remember what exactly that was.
Use g_hash_table_add() to treat it like a set and then copy that over
into a GArray.
Slightly improved code-hygiene, we can afford an extra pointer so we
don't accidentally re-use a variable. And g_clear_pointer() resets
everything to NULL so re-using it will blow up instead of giving us
invalid values.
Instead of
   if (string_list) {
       for (....) {
Do this
   for (...; string_list && ...) {

We can move the string_list != NULL check into the for loop. And use
g_clear_pointer() to ensure our pointer is NULL in case we accidentally
re-use it.

No functional changes.
@whot whot merged commit 1d9cb08 into linuxwacom:master Aug 19, 2024
14 checks passed
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.

1 participant