sprofalyze: fix profile data parsing
This commit is contained in:
parent
be93a3e156
commit
2ea6149f7c
@ -494,8 +494,9 @@ static void load_trace(const char *path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check file format and update totals */
|
/* check file format and update totals */
|
||||||
if (fscanf(file, "stat\n%u %u %u\n",
|
if (fscanf(file, "stat\n%u %u %u",
|
||||||
&size_info, &size_sample, &size_proc) != 3) {
|
&size_info, &size_sample, &size_proc) != 3 ||
|
||||||
|
fgetc(file) != '\n') {
|
||||||
fprintf(stderr, "error: file \"%s\" does not contain an "
|
fprintf(stderr, "error: file \"%s\" does not contain an "
|
||||||
"sprofile trace\n", path);
|
"sprofile trace\n", path);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user