Bug #857 » babeltrace-ctf.diff
formats/ctf/ctf.c | ||
---|---|---|
len = fread(&index_hdr, sizeof(index_hdr), 1, pos->index_fp);
|
||
if (len != 1) {
|
||
perror("read index file header");
|
||
char msgbuf[256];
|
||
strerror_r(errno, msgbuf, sizeof(msgbuf) );
|
||
if (len == 0) {
|
||
strncpy(msgbuf, "Index file is too short", sizeof(msgbuf) );
|
||
}
|
||
fprintf(stderr, "[error] An index file under %s: %s\n",
|
||
td->parent.path, msgbuf);
|
||
ret = -1;
|
||
goto error;
|
||
}
|
||