fix warning from -Wuninitialized

This commit is contained in:
Paolo Bonzini
2011-09-21 11:59:54 +02:00
parent c940381b59
commit a1975e90f6
3 changed files with 9 additions and 1 deletions

View File

@@ -282,6 +282,10 @@ iscsi_set_header_digest(struct iscsi_context *iscsi,
"logged in");
return -1;
}
if ((unsigned)header_digest > ISCSI_HEADER_DIGEST_LAST) {
iscsi_set_error(iscsi, "invalid header digest value");
return -1;
}
iscsi->want_header_digest = header_digest;