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

CRT_degreeSign code shrink #1598

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

Conversation

Explorer09
Copy link
Contributor

Make CRT_degreeSign a writable buffer that will be updated after the initDegreeSign() function. This avoids needing a static buffer in the function.

Also use MB_LEN_MAX for the buffer size, which is more appropriate than the magic number 4.

One side effect of this change is that CRT_degreeSign will lose the const qualifier in the header (CRT.h).

CRT.c Outdated Show resolved Hide resolved
@Explorer09 Explorer09 marked this pull request as draft February 1, 2025 12:00
Make "CRT_degreeSign" a writable buffer that will be updated after the
initDegreeSign() function. This avoids needing a static buffer in the
function.

Also use (MB_LEN_MAX + 1) for the buffer size, which is more
appropriate than the magic number 4.

One side effect of this change is that "CRT_degreeSign" will lose the
const qualifier in the header (CRT.h).

Signed-off-by: Kang-Che Sung <[email protected]>
@Explorer09 Explorer09 marked this pull request as ready for review February 1, 2025 19:42
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