Strip tabs and trailing white spaces, and fix end of files (#748)
* format: Strip trailing whitespaces
We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.
Commit was generated with:
pre-commit run --all-files trailing-whitespace
* format: Files should have exactly one new line end of them
It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.
Commit was generated with:
pre-commit run --all-files end-of-file-fixer
* format: Convert tabs to spaces
Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.
Commit was generated with:
pre-commit run --all-files remove-tabs
---------
Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
+3
-3
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief BACnet ReadProperty-Request and ReadProperty-ACK encode and decode
|
||||
* @brief BACnet ReadProperty-Request and ReadProperty-ACK encode and decode
|
||||
* helper functions
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date 2005
|
||||
@@ -407,7 +407,7 @@ int rp_ack_encode_apdu(
|
||||
* @param apdu_size [in] The total length of the apdu.
|
||||
* @param rpdata [out] The structure holding the partially decoded result.
|
||||
* @return Number of decoded bytes (could be less than apdu_len),
|
||||
* or -1 on decoding error.
|
||||
* or -1 on decoding error.
|
||||
*/
|
||||
int rp_ack_decode_service_request(uint8_t *apdu,
|
||||
int apdu_size,
|
||||
@@ -470,7 +470,7 @@ int rp_ack_decode_service_request(uint8_t *apdu,
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
/* determine the length of the data blob */
|
||||
data_len = bacnet_enclosed_data_length(&apdu[apdu_len],
|
||||
data_len = bacnet_enclosed_data_length(&apdu[apdu_len],
|
||||
apdu_size - apdu_len);
|
||||
if (data_len == BACNET_STATUS_ERROR) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user