Minor style changes to the code#439
Open
freddy77 wants to merge 7 commits intoxapi-project:masterfrom
Open
Conversation
added 7 commits
February 27, 2026 13:45
Make sure file guards macros are consistent. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Some compiler nowadays complain about the old K&R syntax. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Avoid surprises later, during the build phase. The additional includes checking cmocka.h are needed as cmocka.h file is not self-sufficient. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
The call to strncpy would crash as "n - 1" would be cause filling unwanted memory with zero bytes. There was already the check to avoid underflowing the buffer for terminator, but not for the string. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Avoid warnings/errors like: error: 'strncpy' output may be truncated copying 254 bytes from a string of length 255 [-Werror=stringop-truncation] The function is already doing the correct checks to avoid that condition. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Never used. Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
MarkSymsCtx
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
safe_strncpywith zero sizestrncpysafe_strncpyMostly detected by a more recent compiler.