Fix some clang warnings

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2016-02-21 16:13:53 -08:00
parent efedc02224
commit 5a80c7b581
6 changed files with 20 additions and 20 deletions

View File

@@ -561,12 +561,12 @@ void discovery_cb(struct iscsi_context *iscsi, int status, void *command_data, v
printf("discovery callback status:%04x\n", status);
if (status != 0) {
if (status != 0 || command_data == NULL) {
printf("Failed to do discovery on target. : %s\n", iscsi_get_error(iscsi));
exit(10);
}
for(addr=command_data; addr; addr=addr->next) {
for(addr = command_data; addr; addr = addr->next) {
printf("Target:%s Address:%s\n", addr->target_name, addr->portals->portal);
}