Fixed spelling errors detected by code-spell utility. (#895)

* Fixed spelling errors detected by code-spell utility.

* Fixed cppcheck preprocessorErrorDirective. Suppressed new cppcheck warnings until fixed.
This commit is contained in:
Steve Karg
2025-01-21 13:31:43 -06:00
committed by GitHub
parent ece31443b6
commit cfe257fe69
12 changed files with 36 additions and 31 deletions
+13 -11
View File
@@ -11,12 +11,12 @@
#include "bacnet/bacdcode.h"
int bacapp_encode_credential_authentication_factor(
uint8_t *apdu, const BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *caf)
uint8_t *apdu, const BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *factor)
{
int len;
int apdu_len = 0;
len = encode_context_enumerated(&apdu[apdu_len], 0, caf->disable);
len = encode_context_enumerated(&apdu[apdu_len], 0, factor->disable);
if (len < 0) {
return -1;
} else {
@@ -24,7 +24,7 @@ int bacapp_encode_credential_authentication_factor(
}
len = bacapp_encode_context_authentication_factor(
&apdu[apdu_len], 1, &caf->authentication_factor);
&apdu[apdu_len], 1, &factor->authentication_factor);
if (len < 0) {
return -1;
} else {
@@ -37,7 +37,7 @@ int bacapp_encode_credential_authentication_factor(
int bacapp_encode_context_credential_authentication_factor(
uint8_t *apdu,
uint8_t tag,
const BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *caf)
const BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *factor)
{
int len;
int apdu_len = 0;
@@ -45,7 +45,8 @@ int bacapp_encode_context_credential_authentication_factor(
len = encode_opening_tag(&apdu[apdu_len], tag);
apdu_len += len;
len = bacapp_encode_credential_authentication_factor(&apdu[apdu_len], caf);
len =
bacapp_encode_credential_authentication_factor(&apdu[apdu_len], factor);
apdu_len += len;
len = encode_closing_tag(&apdu[apdu_len], tag);
@@ -55,11 +56,11 @@ int bacapp_encode_context_credential_authentication_factor(
}
int bacapp_decode_credential_authentication_factor(
const uint8_t *apdu, BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *caf)
const uint8_t *apdu, BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *factor)
{
int len;
int apdu_len = 0;
uint32_t disable = caf->disable;
uint32_t disable = factor->disable;
if (decode_is_context_tag(&apdu[apdu_len], 0)) {
len = decode_context_enumerated(&apdu[apdu_len], 0, &disable);
@@ -67,7 +68,8 @@ int bacapp_decode_credential_authentication_factor(
return -1;
} else if (disable < ACCESS_AUTHENTICATION_FACTOR_DISABLE_MAX) {
apdu_len += len;
caf->disable = (BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE)disable;
factor->disable =
(BACNET_ACCESS_AUTHENTICATION_FACTOR_DISABLE)disable;
} else {
return -1;
}
@@ -77,7 +79,7 @@ int bacapp_decode_credential_authentication_factor(
if (decode_is_context_tag(&apdu[apdu_len], 1)) {
len = bacapp_decode_context_authentication_factor(
&apdu[apdu_len], 1, &caf->authentication_factor);
&apdu[apdu_len], 1, &factor->authentication_factor);
if (len < 0) {
return -1;
} else {
@@ -93,7 +95,7 @@ int bacapp_decode_credential_authentication_factor(
int bacapp_decode_context_credential_authentication_factor(
const uint8_t *apdu,
uint8_t tag,
BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *caf)
BACNET_CREDENTIAL_AUTHENTICATION_FACTOR *factor)
{
int len = 0;
int section_length;
@@ -101,7 +103,7 @@ int bacapp_decode_context_credential_authentication_factor(
if (decode_is_opening_tag_number(&apdu[len], tag)) {
len++;
section_length =
bacapp_decode_credential_authentication_factor(&apdu[len], caf);
bacapp_decode_credential_authentication_factor(&apdu[len], factor);
if (section_length == -1) {
len = -1;