hercules-ci / hercules-ci-agent

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

[0.9] fix: Avoid s.c_str() #595

Closed roberth closed 5 months ago

roberth commented 5 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.

(cherry picked from commit 072da9a4a5e3638fabd458633408d5f16b5ba87f)