Fix SAP message padding macro

With this patch it is not possible to have incorrect padding equal to 4.
This commit is contained in:
Lukasz Rymanowski 2011-06-21 10:34:05 +02:00 committed by Johan Hedberg
parent 9edfc88f77
commit d70388cda5

View File

@ -49,7 +49,7 @@
#define SAP_UUID "0000112D-0000-1000-8000-00805F9B34FB"
#define SAP_SERVER_CHANNEL 8
#define PADDING4(x) (4 - (x & 0x03))
#define PADDING4(x) ((4 - (x & 0x03)) & 0x03)
#define PARAMETER_SIZE(x) (sizeof(struct sap_parameter) + x + PADDING4(x))
#define SAP_NO_REQ 0xFF