Refactor code so that other protocols can be added with minimal duplicate code.
This commit is contained in:
parent
21893ff091
commit
1972b32b60
12 changed files with 428 additions and 248 deletions
4
sia.c
4
sia.c
|
@ -638,7 +638,7 @@ const struct {
|
|||
|
||||
|
||||
|
||||
const char *sia_code_str(char *code) {
|
||||
const char *sia_code_str(const char *code) {
|
||||
uint16_t i;
|
||||
|
||||
for (i = 0; sia_codes[i].code != NULL; i++) {
|
||||
|
@ -650,7 +650,7 @@ const char *sia_code_str(char *code) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
const char *sia_code_desc(char *code) {
|
||||
const char *sia_code_desc(const char *code) {
|
||||
uint16_t i;
|
||||
|
||||
for (i = 0; sia_codes[i].code != NULL; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue