From d81bcd7b386670ee8ef0a880385a7258b62230cf Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 6 Nov 2012 06:20:11 -0800 Subject: [PATCH] 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. --- lib/init.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/init.c b/lib/init.c index 8c489a7..56c7222 100644 --- a/lib/init.c +++ b/lib/init.c @@ -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