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:
parent
9b9a321637
commit
81645fe18f
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include "fsutils/inifile.h"
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "wld_inifile.h"
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "bas_statement.h"
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "ftpc_config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <strings.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user