Dont print to stderr from _set_error if iscsi is NULL

If iscsi is NULL then just do nothing and dont log to stderr.
Our caller might have closed stderr or worse, re-used fd 2 for something else.
This commit is contained in:
Ronnie Sahlberg
2012-11-06 06:20:11 -08:00
parent bde85a4b57
commit d81bcd7b38

View File

@@ -255,9 +255,6 @@ iscsi_set_error(struct iscsi_context *iscsi, const char *error_string, ...)
strncpy(iscsi->error_string,errstr,MAX_STRING_SIZE);
DPRINTF(iscsi,1,"%s",iscsi->error_string);
}
else {
fprintf(stderr,"libiscsi: %s\n", errstr);
}
}
void