vm: cleanup in os-genunix.cpp
parent
5fc3ad92f6
commit
cfc8b06ac0
|
@ -26,12 +26,7 @@ const char *default_image_path()
|
|||
if(!path)
|
||||
return "factor.image";
|
||||
|
||||
/* We can't call strlen() here because with gcc 4.1.2 this
|
||||
causes an internal compiler error. */
|
||||
int len = 0;
|
||||
const char *iter = path;
|
||||
while(*iter) { len++; iter++; }
|
||||
|
||||
int len = strlen(path);
|
||||
char *new_path = new char[PATH_MAX + SUFFIX_LEN + 1];
|
||||
memcpy(new_path,path,len + 1);
|
||||
memcpy(new_path + len,SUFFIX,SUFFIX_LEN + 1);
|
||||
|
|
Loading…
Reference in New Issue