Skip to content

lib: delete stray undefs for vsnprintf, vsprintf - #14631

Closed
vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:lib-printf-macro-tidy
Closed

vszakats wants to merge 2 commits into
curl:masterfrom
vszakats:lib-printf-macro-tidy

Conversation

@vszakats

@vszakats vszakats commented Aug 21, 2024 •

Copy link
Copy Markdown
Member

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.
@vszakats
vszakats requested a review from bagder August 21, 2024 11:35
Comment thread lib/curlx.h Outdated
# define mvsnprintf curlx_mvsnprintf
# define aprintf curlx_maprintf
# define vaprintf curlx_mvaprintf
# define vsprintf curlx_mvsprintf

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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