Hi,
While developing a symbol service, I see calls to set_error_report_errno().
This function claims to set and return errno from the given report.
But from what I can see in the code, errno is always set to zero and always returns zero.
If this is correct, then I must have misread something, please inform me.
But if it is a bug, I guess that fixing it (setting and returning non-zero errno) would have
consequences since set_error_report_errno() seems to be heavily used.
Best regards,
Claes
errors.h:
/*
* Set errno to indicate TCF standard error report.
* Report objects are kept in a queue of limited size, and old reports are
* disposed by calling release_error_report().
* Clients should not rely on reports being kept in the queue longer then one dispatch cycle.
* Persistent error report can be obtained by calling get_error_report().
* Return new value of errno.
*/
extern int set_error_report_errno(ErrorReport * report);
errors.c:
int set_error_report_errno(ErrorReport * r) {
errno = 0;
if (r != NULL) {
ReportBuffer * report = (ReportBuffer *)((char *)r - offsetof(ReportBuffer, pub));
ErrorMessage * m = alloc_msg(SRC_REPORT);
m->error = report->pub.code + STD_ERR_BASE;
m->report = report;
report->refs++;
}
return errno;
}