Skip to content

use strncasecmp in ares__strsplit#512

Merged
bradh352 merged 2 commits into
c-ares:mainfrom
createyourpersonalaccount:ares_strsplit-strcasecmp
Feb 10, 2023
Merged

use strncasecmp in ares__strsplit#512
bradh352 merged 2 commits into
c-ares:mainfrom
createyourpersonalaccount:ares_strsplit-strcasecmp

Conversation

@createyourpersonalaccount
Copy link
Copy Markdown
Contributor

The previous code used a custom solution with #ifdef CPP directives. The logic in strncasecmp is more thorough, and it is preferred.

There are also two more minor fixes:

  1. A space is added between a control flow keyword its parenthesis, to
    match the style elsewhere in the file.
  2. The included headers are cleaned up; ares_private.h includes all
    the relevant private header functions (such as ares__strsplit and
    strncasecmp)

The previous code used a custom solution with #ifdef CPP
directives. The logic in strncasecmp is more thorough, and it is
preferred.

There are also two more minor fixes:

1) A space is added between a control flow keyword its parenthesis, to
   match the style elsewhere in the file.
2) The included headers are cleaned up; ares_private.h includes all
   the relevant private header functions (such as ares__strsplit and
   strncasecmp)
don't get rid of parens
@bradh352 bradh352 merged commit 4263479 into c-ares:main Feb 10, 2023
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.

2 participants