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

refactor(libntfs-3g): optimise ntfs_uppercase_mbs #134

Open
wants to merge 1 commit into
base: edge
Choose a base branch
from

Conversation

safocl
Copy link

@safocl safocl commented Jan 28, 2025

fix multiple checking and ptr increments

the following lines do a double check of the same for every cycle:

if (n > 0) {

and
} while (n > 0);

(double checks of (n > 0)

the lines with *t++ = [...] perform multiple increments.

fix multiple checking and ptr increments
@safocl
Copy link
Author

safocl commented Jan 28, 2025

(wc < 0x80)
(wc < 0x800)
(wc < 0x10000)
maybe replace with (n == {1, 2, 3}) ?

n = utf8_to_unicode(&wc, s);

* Return the number of used utf8 bytes or -1 with errno set

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.

None yet

1 participant