Added splint script, and started splinting...

This commit is contained in:
skarg
2007-11-28 22:33:36 +00:00
parent 1acdf37597
commit 4e98fc2b03
3 changed files with 16 additions and 5 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
# splint is a static code checker
[ -x /usr/bin/splint ] || exit 0
INCLUDES="-Iinclude -Idemo/handler -Idemo/object -Iports/linux"
directory=${1-`pwd`}
for filename in $( find $directory -name '*.c' )
do
echo splinting ${filename}
/usr/bin/splint ${INCLUDES} ${filename}
done
+2 -2
View File
@@ -61,7 +61,7 @@ int abort_decode_service_request(uint8_t * apdu,
{
int len = 0;
if (apdu_len) {
if (apdu_len > 0) {
if (invoke_id)
*invoke_id = apdu[0];
if (abort_reason)
@@ -86,7 +86,7 @@ int abort_decode_apdu(uint8_t * apdu,
if (!apdu)
return -1;
/* optional checking - most likely was already done prior to this call */
if (apdu_len) {
if (apdu_len > 0) {
if ((apdu[0] & 0xF0) != PDU_TYPE_ABORT)
return -1;
if (apdu[0] & 1)
+1 -3
View File
@@ -116,9 +116,7 @@ void apdu_set_unrecognized_service_handler_handler(confirmed_function
/* Unconfirmed Function Handlers */
/* If they are not set, they are not handled */
static unconfirmed_function
Unconfirmed_Function[MAX_BACNET_UNCONFIRMED_SERVICE] = {
NULL
};
Unconfirmed_Function[MAX_BACNET_UNCONFIRMED_SERVICE];
void apdu_set_unconfirmed_handler(BACNET_UNCONFIRMED_SERVICE
service_choice, unconfirmed_function pFunction)