From 796b3a6acc69fbaf9232ad2bc26c1defd964b253 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Sun, 2 Jan 2011 08:22:38 +1100 Subject: [PATCH] login.c: Dont end error strings with \n, Leave that for the caller. --- lib/login.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/login.c b/lib/login.c index ff48b02..34b19fe 100644 --- a/lib/login.c +++ b/lib/login.c @@ -880,7 +880,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, status = ntohs(*(uint16_t *)&in->hdr[36]); if (status != 0) { - iscsi_set_error(iscsi, "Failed to log in to target. Status: %s(%d)\n", + iscsi_set_error(iscsi, "Failed to log in to target. Status: %s(%d)", login_error_str(status), status); pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL, pdu->private_data); @@ -959,7 +959,7 @@ iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, free(iscsi->chap_c); iscsi->chap_c = strdup((char *)ptr+9); if (iscsi->chap_c == NULL) { - iscsi_set_error(iscsi, "Out-of-memory: Failed to strdup CHAP challenge\n"); + iscsi_set_error(iscsi, "Out-of-memory: Failed to strdup CHAP challenge."); pdu->callback(iscsi, SCSI_STATUS_ERROR, NULL, pdu->private_data); return -1; }