3600942 check return code

This commit is contained in:
Ales Ledvinka 2013-01-16 12:24:13 +00:00
parent 6eda3b5482
commit 15d683d86d

View File

@ -736,7 +736,10 @@ ipmi_sunoem_sshkey_set(struct ipmi_intf * intf, uint8_t uid, char * ifile)
i_size = SSHKEY_BLOCK_SIZE;
memset(wbuf, 0, SSHKEY_BLOCK_SIZE);
fseek(fp, r, SEEK_SET);
if (-1 == fseek(fp, r, SEEK_SET)) {
lprintf(LOG_ERR, "Seek error %s. %s", ifile, strerror(errno));
return -1;
}
count = fread(wbuf+3, 1, i_size, fp);
if (count != i_size) {
lprintf(LOG_ERR, "Unable to read %d bytes from file %s", i_size, ifile);