szaszm commented on a change in pull request #674: Minificpp 1007 - ECU C2 integration. URL: https://github.com/apache/nifi-minifi-cpp/pull/674#discussion_r371420564
########## File path: nanofi/include/core/string_utils.h ########## @@ -87,6 +87,65 @@ int validate_list(token_list * tk_list); */ void attach_lists(token_list * to, token_list * from); +/** + * Copies source string into destination + * @param source, the string to copy from + * @param dest, the destination to copy into + * This function allocates heap memory for destination + * so the caller is expected to free it + * + * @attention the source string is expected to be + * null terminated + */ +void copystr(const char * source, char ** dest); Review comment: We could use the return value to return the result like `strdup` does. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
