X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbemain.c;h=1ad8993b38e9053be6e0f4f19bf83b4575e32034;hb=22a41af141d13f4b29424f9a2215455a7bb88167;hp=1baca253ddb315a33a8215b59a9a0cb0d4f119ee;hpb=16fc4cdb8f7bc9d203f4e024d0bad50f79867c4f;p=libfirm diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 1baca253d..1ad8993b3 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -547,9 +547,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) Get the filename for the profiling data. Beware: '\0' is already included in sizeof(suffix) */ - memset(prof_filename, 0, sizeof(prof_filename)); - strncpy(prof_filename, cup_name, sizeof(prof_filename) - sizeof(suffix)); - strcat(prof_filename, suffix); + sprintf(prof_filename, "%.*s%s\n", (int)(sizeof(prof_filename) - sizeof(suffix)), cup_name, suffix); /* Next: Either instruments all irgs with profiling code