Skip to content

Commit

Permalink
strcasecmp, strncasecmp, bzero, bcmp, and bcopy should be defined in …
Browse files Browse the repository at this point in the history
…strings.h, not string.h. bzero, bcmp, and bcopy are legacy functions; the contemporary counterparts should be used instead.
  • Loading branch information
gregory-nutt committed Feb 16, 2017
1 parent 9b9a321 commit 81645fe
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/buttons/buttons_main.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/tcpecho/tcpecho_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/xmlrpc/xmlrpc_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fsutils/inifile/inifile.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <debug.h>

#include "fsutils/inifile.h"
Expand Down
2 changes: 1 addition & 1 deletion graphics/traveler/tools/libwld/wld_inifile.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>

#include "wld_inifile.h"

Expand Down
2 changes: 1 addition & 1 deletion interpreters/bas/bas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions interpreters/bas/bas_statement.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <nuttx/config.h>

#include <stdlib.h>
#include <strings.h>

#include "bas_statement.h"

Expand Down
2 changes: 1 addition & 1 deletion modbus/nuttx/portserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion modbus/nuttx/portserial_m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions netutils/ftpc/ftpc_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "ftpc_config.h"

#include <stdlib.h>
#include <strings.h>
#include <stdarg.h>
#include <errno.h>
#include <debug.h>
Expand Down
2 changes: 1 addition & 1 deletion netutils/ftpd/ftpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion netutils/thttpd/libhttpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion netutils/webclient/webclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion netutils/xmlrpc/xmlparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
2 changes: 1 addition & 1 deletion nshlib/nsh_timcmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <nuttx/config.h>

#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <time.h>

Expand Down

0 comments on commit 81645fe

Please sign in to comment.