simplify
This commit is contained in:
@ -612,11 +612,8 @@ void WriteRestart::file_layout(int send_size)
|
|||||||
|
|
||||||
void WriteRestart::magic_string()
|
void WriteRestart::magic_string()
|
||||||
{
|
{
|
||||||
int n = strlen(MAGIC_STRING) + 1;
|
std::string magic = MAGIC_STRING;
|
||||||
char *str = new char[n];
|
fwrite(magic.c_str(),sizeof(char),magic.size()+1,fp);
|
||||||
strcpy(str,MAGIC_STRING);
|
|
||||||
fwrite(str,sizeof(char),n,fp);
|
|
||||||
delete [] str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user