hercules-ci / hercules-ci-agent

https://hercules-ci.com build and deployment agent
Apache License 2.0
99 stars 19 forks source link

fix: Avoid s.c_str() #587

Closed roberth closed 6 months ago

roberth commented 6 months ago

s.c_str() is only defined while s is in scope. Fine for variables, but unassigned return values cause undefined behavior.

This gets rid of almost all of the c_str() calls. A few remain, and those have been checked for this problem and are ok.