Bugfix/cppcheck error code fixes (#244)

* Add flawfinder. Add error code for exit status.

* fix errors found by cppcheck

* fix initialization warning in unit test compile

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2022-03-28 10:29:52 -05:00
committed by GitHub
parent 7b685d0e3d
commit 5b07b484d4
7 changed files with 32 additions and 10 deletions
+2 -2
View File
@@ -544,7 +544,7 @@ bool bacfile_read_ack_stream_data(
pFilename = bacfile_name(instance);
if (pFilename) {
found = true;
pFile = fopen(pFilename, "rb");
pFile = fopen(pFilename, "rb+");
if (pFile) {
(void)fseek(pFile, data->type.stream.fileStartPosition, SEEK_SET);
if (fwrite(octetstring_value(&data->fileData[0]),
@@ -574,7 +574,7 @@ bool bacfile_read_ack_record_data(
pFilename = bacfile_name(instance);
if (pFilename) {
found = true;
pFile = fopen(pFilename, "rb");
pFile = fopen(pFilename, "rb+");
if (pFile) {
if (data->type.record.fileStartRecord > 0) {
for (i = 0; i < (uint32_t)data->type.record.fileStartRecord;