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

Dead code #496

Closed
ZHJ1237 opened this issue Aug 10, 2020 · 2 comments
Closed

Dead code #496

ZHJ1237 opened this issue Aug 10, 2020 · 2 comments

Comments

@ZHJ1237
Copy link

ZHJ1237 commented Aug 10, 2020

cJSON/cJSON.c

Line 1980 in cf97c6f

while (child->next)

I think child->prev always != NULL so that we can not reach code from line 1979 to 1986。
Please check whether it is a dead code or not.

else
        {
            while (child->next)
            {
                child = child->next;
            }
            suffix_object(child, item);
            array->child->prev = item;
        }
@Alanscut
Copy link
Collaborator

Removing it will make cJSON_Utils failed, I will check it and to optimize it when I'm free.

@Alanscut
Copy link
Collaborator

Alanscut commented Sep 3, 2020

fixed by #503

@Alanscut Alanscut closed this as completed Sep 3, 2020
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

No branches or pull requests

2 participants