#define SUFFIX ".image"
#define SUFFIX_LEN 6
-/* You must free() the result yourself. */
+// You must free() the result yourself.
const char* default_image_path() {
const char* path = vm_executable_path();
if (!path)
return strdup("factor.image");
- int len = strlen(path);
+ size_t len = strlen(path);
char* new_path = (char *)malloc(len + SUFFIX_LEN + 1);
memcpy(new_path, path, len);
memcpy(new_path + len, SUFFIX, SUFFIX_LEN + 1);