Indented using indent script. Corrected any C++ comments using the comment script.

This commit is contained in:
skarg
2008-03-10 21:00:48 +00:00
parent 25b4979a28
commit cf9d15631a
33 changed files with 381 additions and 436 deletions
+7 -7
View File
@@ -39,7 +39,7 @@
#include "bip.h"
#include "net.h" /* custom per port */
#if PRINT_ENABLED
#include <stdio.h> /* for standard integer types uint8_t etc. */
#include <stdio.h> /* for standard integer types uint8_t etc. */
#endif
static int BIP_Socket = -1;
/* port to use - stored in host byte order */
@@ -253,7 +253,7 @@ uint16_t bip_receive(
(sin.sin_port == htons(BIP_Port))) {
pdu_len = 0;
#if PRINT_ENABLED
fprintf(stderr,"BIP: src is me. Discarded!\n");
fprintf(stderr, "BIP: src is me. Discarded!\n");
#endif
} else {
/* copy the source address - into host format */
@@ -268,17 +268,17 @@ uint16_t bip_receive(
pdu_len -= 4;
if (pdu_len < max_pdu) {
#if 0
fprintf(stderr,"BIP: NPDU[%hu]:",pdu_len);
fprintf(stderr, "BIP: NPDU[%hu]:", pdu_len);
#endif
/* shift the buffer to return a valid PDU */
for (i = 0; i < pdu_len; i++) {
pdu[i] = pdu[4 + i];
#if 0
fprintf(stderr,"%02X ",pdu[i]);
fprintf(stderr, "%02X ", pdu[i]);
#endif
}
#if 0
fprintf(stderr,"\n");
fprintf(stderr, "\n");
#endif
}
/* ignore packets that are too large */
@@ -286,13 +286,13 @@ uint16_t bip_receive(
else {
pdu_len = 0;
#if PRINT_ENABLED
fprintf(stderr,"BIP: PDU too large. Discarded!.\n");
fprintf(stderr, "BIP: PDU too large. Discarded!.\n");
#endif
}
}
} else {
#if PRINT_ENABLED
fprintf(stderr,"BIP: BVLC discarded!\n");
fprintf(stderr, "BIP: BVLC discarded!\n");
#endif
}