Cleaned up warnings from File Record enhancements.

This commit is contained in:
skarg
2013-08-29 18:32:31 +00:00
parent efe8587f9f
commit e05af7f624
2 changed files with 3 additions and 4 deletions
-1
View File
@@ -107,7 +107,6 @@ void handler_atomic_read_file(
int pdu_len = 0;
bool error = false;
int bytes_sent = 0;
uint32_t offset = 0;
BACNET_NPDU_DATA npdu_data;
BACNET_ADDRESS my_address;
BACNET_ERROR_CLASS error_class = ERROR_CLASS_OBJECT;
+3 -3
View File
@@ -130,9 +130,9 @@ static void AtomicReadFileAckHandler(
/* is there anything to do with this? data.stream.requestedOctetCount */
(void) fseek(pFile, data.type.stream.fileStartPosition,
SEEK_SET);
octets_written = fwrite(octetstring_value(&data.fileData), 1, /* unit to write in bytes - in our case, an octet is one byte */
octetstring_length(&data.fileData), pFile);
if (octets_written != octetstring_length(&data.fileData)) {
octets_written = fwrite(octetstring_value(&data.fileData[0]), 1, /* unit to write in bytes - in our case, an octet is one byte */
octetstring_length(&data.fileData[0]), pFile);
if (octets_written != octetstring_length(&data.fileData[0])) {
fprintf(stderr, "Unable to write data to file \"%s\".\n",
Local_File_Name);
} else if (octets_written == 0) {