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

Don't copy the program name in argv_process_no_env #62

Merged
merged 1 commit into from
Apr 17, 2021

Conversation

xiaoxiang781216
Copy link
Contributor

to save the memory

@j256
Copy link
Owner

j256 commented Apr 17, 2021

You sure that it doesn't change?

to save the memory and make argv_program to const

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1fef3418f103664a0c3fde02e490eba834539f49
@xiaoxiang781216
Copy link
Contributor Author

You sure that it doesn't change?

I add const to argv_program to avoid modify(e.g. strcpy) argv_program internally. If you mean caller modify argv[0] directly, I suppose that no people is so crazy:).

@j256 j256 merged commit fb0c19f into j256:master Apr 17, 2021
@xiaoxiang781216 xiaoxiang781216 deleted the programname branch April 17, 2021 20:24
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