Conversation
Define the ll variable with the __cleanup_free macro. This allows to remove the free(3) and also get rid of the added FILE * variable as we can go back to directly returning the result from fopen(3), seeing as ll will now be free'd automatically when it goes out of scope. This provides a nice cleanup to commit 774ae8b ("Fix a couple of compiler warnings"). Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
Since libmtdac 1.6.2+ when calling an endpoint that only takes an optional query string and if we are not passing one, we can simply pass params as NULL, rather than building a params array with a NULL member. Signed-off-by: Andrew Clayton <ac@sigsegv.uk>
There was a problem hiding this comment.
Pull request overview
This PR makes small internal cleanups in the ITSA CLI implementation, simplifying an API call site and tightening memory handling in log file selection.
Changes:
- Pass
NULLinstead of an empty compound-literal params array tomtd_ep()when listing UK savings accounts. - Refactor
set_log_fp()to rely on__cleanup_freeforlland returnfopen()directly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.