Skip to content

Commit

Permalink
libc/netdb: Remove unnecessary CONFIG_LIBC_NETDB checks
Browse files Browse the repository at this point in the history
Since it already checked by Make.defs and CMakeLists.txt

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
  • Loading branch information
no1wudi committed Sep 14, 2024
1 parent 7a495fa commit 2e9e79c
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 39 deletions.
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostbyaddr.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -71,4 +69,3 @@ FAR struct hostent *gethostbyaddr(FAR const void *addr,
return ret == 0 ? res : NULL;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostbyaddrr.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@

#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Private Type Definitions
****************************************************************************/
Expand Down Expand Up @@ -441,4 +439,3 @@ int gethostbyaddr_r(FAR const void *addr, socklen_t len, int type,
return ret;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostbyname.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <netdb.h>

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -65,4 +63,3 @@ FAR struct hostent *gethostbyname(FAR const char *name)
return gethostbyname2(name, AF_UNSPEC);
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostbyname2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -73,4 +71,3 @@ FAR struct hostent *gethostbyname2(FAR const char *name, int type)
return ret == 0 ? res : NULL;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostbyname2r.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@

#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -104,4 +102,3 @@ int gethostbyname2_r(FAR const char *name, int type,
return ret;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostbynamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <netdb.h>

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -73,4 +71,3 @@ int gethostbyname_r(FAR const char *name,
host, buf, buflen, result, h_errnop);
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_gethostentbynamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
#include "netdb/lib_dns.h"
#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Private Type Definitions
****************************************************************************/
Expand Down Expand Up @@ -789,4 +787,3 @@ int gethostentbyname_r(FAR const char *name,
return ERROR;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_getnameinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@

#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -197,4 +195,3 @@ int getnameinfo(FAR const struct sockaddr *addr, socklen_t addrlen,
return OK;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_getservbyname.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <netdb.h>

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand All @@ -47,4 +45,3 @@ FAR struct servent *getservbyname(FAR const char *name,
return (ret != OK) ? NULL : res;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_getservbynamer.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

#include "lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Private Data
****************************************************************************/
Expand Down Expand Up @@ -116,4 +114,3 @@ int getservbyname_r(FAR const char *name, FAR const char *proto,
return ENOENT;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_getservbyport.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

#include <netdb.h>

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand All @@ -46,4 +44,3 @@ FAR struct servent *getservbyport(int port, FAR const char *proto)
return (ret != OK) ? NULL : res;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_getservbyportr.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@

#include "lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Functions
****************************************************************************/
Expand Down Expand Up @@ -100,4 +98,3 @@ int getservbyport_r(int port, FAR const char *proto,
return ENOENT;
}

#endif /* CONFIG_LIBC_NETDB */
3 changes: 0 additions & 3 deletions libs/libc/netdb/lib_netdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include "netdb/lib_netdb.h"

#ifdef CONFIG_LIBC_NETDB

/****************************************************************************
* Public Data
****************************************************************************/
Expand Down Expand Up @@ -93,4 +91,3 @@ bool convert_hostent(FAR const struct hostent_s *in,
return j != 0;
}

#endif /* CONFIG_LIBC_NETDB */

0 comments on commit 2e9e79c

Please sign in to comment.