Run nxstyle against files modified in previous commit.
@@ -70,9 +70,11 @@ static inline int check_buffer(unsigned char *buf)
{
j = 1;
}
+
if (buf[j] != ch)
{
- printf("server: Buffer content error for offset=%d, index=%d\n", offset, j);
+ printf("server: Buffer content error for offset=%d, index=%d\n",
+ offset, j);
ret = 0;
}
}
@@ -95,6 +97,7 @@ int main(int argc, FAR char *argv[])
int nbytes;
int optval;
int offset;
+ int ret;
/* Parse any command line options */
@@ -112,7 +115,9 @@ int main(int argc, FAR char *argv[])
/* Set socket to reuse address */
optval = 1;
- if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0)
+ ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (FAR void *)&optval,
+ sizeof(int));
+ if (ret < 0)
{
printf("server: setsockopt SO_REUSEADDR failure: %d\n", errno);
exit(1);
@@ -124,7 +129,7 @@ int main(int argc, FAR char *argv[])
memcpy(&server.sa_addr, &g_server_addr, sizeof(struct ieee802154_saddr_s));
addrlen = sizeof(struct sockaddr_ieee802154_s);
- if (bind(sockfd, (struct sockaddr*)&server, addrlen) < 0)
+ if (bind(sockfd, (FAR struct sockaddr *)&server, addrlen) < 0)
{
printf("server: bind failure: %d\n", errno);
exit(1);
@@ -170,14 +175,16 @@ int main(int argc, FAR char *argv[])
if (nbytes != SENDSIZE)
{
- printf("server: %d. recv size incorrect: %d vs %d\n", offset, nbytes, SENDSIZE);
+ printf("server: %d. recv size incorrect: %d vs %d\n",
+ offset, nbytes, SENDSIZE);
close(sockfd);
exit(1);
}
if (offset < inbuf[0])
{
- printf("server: %d. %d packets lost, resetting offset\n", offset, inbuf[0] - offset);
+ printf("server: %d. %d packets lost, resetting offset\n",
+ offset, inbuf[0] - offset);
offset = inbuf[0];
}
else if (offset > inbuf[0])
