On 8/8/23 07:17, Yeqi Fu wrote:
+ char *new_env_value = NULL; + size_t new_env_len = strlen(entry->ev_var) + strlen(eq_sign) + + strlen(separator) + 1; + new_env_value = g_malloc(new_env_len); + strcpy(new_env_value, entry->ev_var); + strcat(new_env_value, separator); + strcat(new_env_value, eq_sign + 1);
This is new_env_value = g_strconcat(entry->ev_var, separator, eq_sign + 1, NULL); r~