strcasecmp, strncasecmp, bzero, bcmp, and bcopy should be defined in strings.h, not string.h. bzero, bcmp, and bcopy are legacy functions; the contemporary counterparts should be used instead.

This commit is contained in:
Gregory Nutt 2017-02-16 15:58:15 -06:00
parent 9b9a321637
commit 81645fe18f
15 changed files with 15 additions and 13 deletions

View File

@ -1,7 +1,7 @@
/****************************************************************************
* examples/buttons/buttons_main.c
*
* Copyright (C) 2016-2027 Gregory Nutt. All rights reserved.
* Copyright (C) 2016-2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without

View File

@ -212,7 +212,7 @@ static int tcpecho_server(void)
return ERROR;
}
bzero(&servaddr, sizeof(servaddr));
memset(&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
servaddr.sin_port = htons(CONFIG_EXAMPLES_TCPECHO_PORT);

View File

@ -390,7 +390,7 @@ int xmlrpc_main(int argc, char *argv[])
setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
bzero((void *)&servaddr, sizeof(servaddr));
memset((void *)&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
servaddr.sin_port = htons(80);

View File

@ -41,7 +41,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <debug.h>
#include "fsutils/inifile.h"

View File

@ -40,7 +40,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "wld_inifile.h"

View File

@ -75,7 +75,7 @@
#include <fcntl.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <unistd.h>

View File

@ -63,6 +63,7 @@
#include <nuttx/config.h>
#include <stdlib.h>
#include <strings.h>
#include "bas_statement.h"

View File

@ -231,7 +231,7 @@ bool xMBPortSerialInit(uint8_t ucPort, speed_t ulBaudRate,
}
else
{
bzero(&xNewTIO, sizeof(struct termios));
memset(&xNewTIO, 0, sizeof(struct termios));
xNewTIO.c_iflag |= IGNBRK | INPCK;
xNewTIO.c_cflag |= CREAD | CLOCAL;

View File

@ -237,7 +237,7 @@ bool xMBMasterPortSerialInit(uint8_t ucPort, speed_t ulBaudRate,
}
else
{
bzero(&xNewTIO, sizeof(struct termios));
memset(&xNewTIO, 0, sizeof(struct termios));
xNewTIO.c_iflag |= IGNBRK | INPCK;
xNewTIO.c_cflag |= CREAD | CLOCAL;

View File

@ -40,6 +40,7 @@
#include "ftpc_config.h"
#include <stdlib.h>
#include <strings.h>
#include <stdarg.h>
#include <errno.h>
#include <debug.h>

View File

@ -52,7 +52,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <strings.h>
#include <ctype.h>
#include <fcntl.h>
#include <poll.h>

View File

@ -50,7 +50,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <string.h>
#include <strings.h>
#include <stdarg.h>
#include <ctype.h>
#include <fcntl.h>

View File

@ -61,7 +61,7 @@
#include <stdbool.h>
#include <unistd.h>
#include <netdb.h>
#include <string.h>
#include <strings.h>
#include <errno.h>
#include <arpa/inet.h>

View File

@ -304,7 +304,7 @@ static int xmlrpc_parsemethod(struct parsebuf_s * pbuf)
{
int type, ret = XMLRPC_PARSE_ERROR;
bzero((void *)&g_xmlcall, sizeof(struct xmlrpc_s));
memset((void *)&g_xmlcall, 0, sizeof(struct xmlrpc_s));
/* Look for the methodName tag */

View File

@ -40,7 +40,7 @@
#include <nuttx/config.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <time.h>