- if (!(histfile_tmp= (char*) malloc(static_cast<uint32_t>(strlen(histfile) + 5))))
The internal one (static_cast<uint32_t> is not needed. strlen returns size_t which is the type malloc takes. However, (char *) can certainly be changed to use a c++ cast. (and don't even get me started on this needing to be a std::string instead of a malloc'd char *...
The other two are not - you do not need to const cast to _add_ const qualifiers, only to take them away.
- if (!(histfile_tmp= (char*) malloc( static_ cast<uint32_ t>(strlen( histfile) + 5))))
The internal one (static_ cast<uint32_ t> is not needed. strlen returns size_t which is the type malloc takes. However, (char *) can certainly be changed to use a c++ cast. (and don't even get me started on this needing to be a std::string instead of a malloc'd char *...
The other two are not - you do not need to const cast to _add_ const qualifiers, only to take them away.