- /* TODO : check return value */
- fread(&tmp.type, sizeof(tmp.type), 1, fp);
- fread(&tmp.name, sizeof(tmp.name), 1, fp);
- fread(&tmp.brand, sizeof(tmp.brand), 1, fp);
- fread(&tmp.pid, sizeof(tmp.pid), 1, fp);
- fread(&tmp.free_events, sizeof(tmp.free_events), 1, fp);
- fread(&tmp.tgid, sizeof(tmp.tgid), 1, fp);
- fread(&tmp.ppid, sizeof(tmp.ppid), 1, fp);
- fread(&tmp.cpu, sizeof(tmp.cpu), 1, fp);
- fread(&tmp.creation_time, sizeof(tmp.creation_time), 1, fp);
- fread(&tmp.insertion_time, sizeof(tmp.insertion_time), 1, fp);
+ res = fread(&tmp.type, sizeof(tmp.type), 1, fp);
+ res += fread(&tmp.name, sizeof(tmp.name), 1, fp);
+ res += fread(&tmp.brand, sizeof(tmp.brand), 1, fp);
+ res += fread(&tmp.pid, sizeof(tmp.pid), 1, fp);
+ res += fread(&tmp.free_events, sizeof(tmp.free_events), 1, fp);
+ res += fread(&tmp.tgid, sizeof(tmp.tgid), 1, fp);
+ res += fread(&tmp.ppid, sizeof(tmp.ppid), 1, fp);
+ res += fread(&tmp.cpu, sizeof(tmp.cpu), 1, fp);
+ res += fread(&tmp.creation_time, sizeof(tmp.creation_time), 1, fp);
+ res += fread(&tmp.insertion_time, sizeof(tmp.insertion_time), 1, fp);
+ g_assert(res == 10);