Skip to content

Use zend_string_equals_* API some more #6979

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

Closed
wants to merge 1 commit into from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented May 13, 2021

As it makes it clearer

@Girgias Girgias force-pushed the more-string_equals_usage branch from 5ae9b34 to 5044d71 Compare May 13, 2021 14:20
@Girgias Girgias force-pushed the more-string_equals_usage branch from 5044d71 to 1ebf2b5 Compare May 13, 2021 14:45
xmlNode *nodep, *nsnode = NULL;
xmlNsPtr ns = NULL, curns;
char *strURI;
char *prefix;
char *prefix_char;
Copy link
Member

Choose a reason for hiding this comment

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

This makes it sound like prefix is a single character...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah now that you mention it, any idea of a better name? Or should I rename this to prefix, and the zend_string to prefix_str?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds reasonable

domain_name = domain;
} else {
domain_name = NULL;
if (domain != NULL && (ZSTR_LEN(domain) != 0) && !zend_string_equals_literal(domain, "0")) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (domain != NULL && (ZSTR_LEN(domain) != 0) && !zend_string_equals_literal(domain, "0")) {
if (domain != NULL && ZSTR_LEN(domain) != 0 && !zend_string_equals_literal(domain, "0")) {

@Girgias Girgias closed this in e7135cb May 14, 2021
@Girgias Girgias deleted the more-string_equals_usage branch September 3, 2021 20:54
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