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

lib: delete stray undefs for vsnprintf, vsprintf #14631

Closed
wants to merge 2 commits into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Aug 21, 2024

Stop #undefining macros that were not redefined or used in the code.

- `lib/curl_printf.h` undefined a macro that was not redefined, nor used
  in the source. Delete it.

- `lib/curlx.h` undefined a macro that was not redefined. Map it to its
  `curlx_m*` counterpart.
lib/curlx.h Outdated
@@ -112,6 +112,7 @@
# define mvsnprintf curlx_mvsnprintf
# define aprintf curlx_maprintf
# define vaprintf curlx_mvaprintf
# define vsprintf curlx_mvsprintf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add this define. This function should not be used in libcurl code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, then # undef vsprintf can be safely deleted few lines above, isn't it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it seems to serve no purpose.

@vszakats vszakats changed the title lib: delete vsnprintf ref, add missing vsprintf redef lib: delete stray undefs for vsnprintf, vsprintf Aug 21, 2024
@vszakats vszakats closed this in 9724526 Aug 21, 2024
@vszakats vszakats deleted the lib-printf-macro-tidy branch August 21, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants