vm: cleanup in os-genunix.cpp

db4
Slava Pestov 2009-10-02 20:36:19 -05:00
parent 5fc3ad92f6
commit cfc8b06ac0
1 changed files with 1 additions and 6 deletions

View File

@ -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);