Performed standard indent script indent.sh on project files.
This commit is contained in:
@@ -259,25 +259,16 @@ bool bip_init(
|
||||
bip_set_addr(my_addr.s_addr);
|
||||
set_broadcast_address(my_addr.s_addr);
|
||||
bip_set_port(htons((0xBAC0));
|
||||
|
||||
/* assumes that the driver has already been initialized */
|
||||
sock_fd = socket(AF_INET, SOCK_DGRAM, IPROTO_UDP);
|
||||
bip_set_socket(sock_fd);
|
||||
if (sock_fd < 0)
|
||||
/* assumes that the driver has already been initialized */
|
||||
sock_fd = socket(AF_INET, SOCK_DGRAM, IPROTO_UDP);
|
||||
bip_set_socket(sock_fd); if (sock_fd < 0)
|
||||
return false;
|
||||
/* bind the socket to the local port number and IP address */
|
||||
sin.sin_family = AF_INET; sin.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
sin.sin_port = bip_get_port(); memset(&(sin.sin_zero), '\0', 8);
|
||||
rv =
|
||||
bind(sock_fd, (const struct sockaddr *) &sin, sizeof(struct sockaddr));
|
||||
if (rv < 0) {
|
||||
close(sock_fd); bip_set_socket(-1); return false;}
|
||||
|
||||
/* bind the socket to the local port number and IP address */
|
||||
sin.sin_family = AF_INET;
|
||||
sin.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
sin.sin_port = bip_get_port();
|
||||
memset(&(sin.sin_zero), '\0', 8);
|
||||
rv = bind(sock_fd, (const struct sockaddr *) &sin,
|
||||
sizeof(struct sockaddr));
|
||||
if (rv < 0) {
|
||||
close(sock_fd);
|
||||
bip_set_socket(-1);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;}
|
||||
|
||||
@@ -942,7 +942,7 @@ bool MSTP_Master_Node_FSM(
|
||||
(mstp_port->Next_Station == mstp_port->This_Station)) {
|
||||
/* NextStationUnknown - added in Addendum 135-2008v-1 */
|
||||
/* then the next station to which the token
|
||||
should be sent is unknown - so PollForMaster */
|
||||
should be sent is unknown - so PollForMaster */
|
||||
mstp_port->Poll_Station = next_this_station;
|
||||
MSTP_Create_And_Send_Frame(mstp_port,
|
||||
FRAME_TYPE_POLL_FOR_MASTER, mstp_port->Poll_Station,
|
||||
|
||||
Reference in New Issue
Block a user