Run nxstyle against files modified in previous commit.

This commit is contained in:
Gregory Nutt 2020-04-12 11:22:34 -06:00 committed by Abdelatif Guettouche
parent f95d753759
commit 58085e5983
2 changed files with 14 additions and 7 deletions

View File

@ -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])

View File

@ -215,7 +215,7 @@ static int ufstest_open(FAR void *volinfo, FAR const char *relpath,
if (file != NULL)
{
opriv = (FAR struct ufstest_openfile_s *)
malloc(sizeof(struct ufstest_openfile_s ));
malloc(sizeof(struct ufstest_openfile_s));
if (opriv == NULL)
{
return -ENOMEM;
@ -420,7 +420,7 @@ static int ufstest_opendir(FAR void *volinfo, FAR const char *relpath,
/* The path refers to the top level directory. */
odir = (FAR struct ufstest_opendir_s *)
malloc(sizeof(struct ufstest_opendir_s ));
malloc(sizeof(struct ufstest_opendir_s));
if (odir == NULL)
{
return -ENOMEM;