switch (dret) {
case DCHECK_EOF:
case DCHECK_E_NO_MARKER:
+ PR_DEBUG("First segment is not a marker");
return PARSE_E_NOT_FOUND; /* First segment is not a marker */
default:
break;
while (read_file) {
if (ferror(datafile)) {
+ PR_DEBUG("Cannot read stream");
free(*pairs);
*pairs = NULL;
return PARSE_E_CANT_READ;
r = fread(raw, SEGMENT_SIZE, 1, datafile);
if (r != 1) {
+ PR_DEBUG("Cannot read segment");
free(*pairs);
*pairs = NULL;
return PARSE_E_CANT_READ;
nptr = realloc(*pairs, sizeof(struct HPCS_TVPair) * alloc_size);
if (nptr == NULL) {
+ PR_DEBUG("No memory to store data");
free(*pairs);
*pairs = NULL;
return PARSE_E_NO_MEM;
read_file = false;
break;
default:
+ PR_DEBUG("Marker was expected but it was not found");
free(*pairs);
*pairs = NULL;
return PARSE_E_NOT_FOUND;