Skip to content
Snippets Groups Projects
Commit a33a1b22 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

sprintf --> snprintf to please John. :)

parent 5f3aaa92
No related branches found
No related tags found
1 merge request!140First version of main() using a parameter file to get constants.
......@@ -496,7 +496,7 @@ int main(int argc, char *argv[]) {
/* Make sure output file is empty, only on one rank. */
char dumpfile[30];
sprintf(dumpfile, "thread_info_MPI-step%d.dat", j);
snprintf(dumpfile, 30, "thread_info_MPI-step%d.dat", j);
FILE *file_thread;
if (myrank == 0) {
file_thread = fopen(dumpfile, "w");
......@@ -543,7 +543,7 @@ int main(int argc, char *argv[]) {
#else
char dumpfile[30];
sprintf(dumpfile, "thread_info-step%d.dat", j);
snprintf(dumpfile, 30, "thread_info-step%d.dat", j);
FILE *file_thread;
file_thread = fopen(dumpfile, "w");
for (int l = 0; l < e.sched.nr_tasks; l++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment