summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2007-07-15 13:11:08 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2007-07-15 13:11:08 +0000
commit835e53f99baf976842df4445a252c6cd39c086ff (patch)
treef085606eb6aa7f85ffc49ab7c4e7ee81a7cd16b0 /ACE
parent25386e828bc6554bff73093162a6611c6486a728 (diff)
downloadATCD-835e53f99baf976842df4445a252c6cd39c086ff.tar.gz
Sun Jul 15 13:08:50 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ChangeLog20
-rw-r--r--ACE/ace/Malloc.h2
-rw-r--r--ACE/ace/OS_NS_stdio.inl2
-rw-r--r--ACE/ace/OS_NS_stropts.cpp12
-rw-r--r--ACE/ace/OS_NS_unistd.cpp4
-rw-r--r--ACE/ace/Object_Manager_Base.cpp2
-rw-r--r--ACE/ace/QoS/QoS_Session_Impl.cpp30
-rw-r--r--ACE/ace/Rtems_init.c12
-rw-r--r--ACE/ace/SOCK_Dgram.cpp4
-rw-r--r--ACE/ace/SOCK_Dgram_Mcast.cpp8
-rw-r--r--ACE/ace/SOCK_SEQPACK_Connector.inl2
-rw-r--r--ACE/ace/SSL/SSL_Asynch_BIO.cpp4
-rw-r--r--ACE/ace/SSL/SSL_Context.cpp4
-rw-r--r--ACE/ace/Sock_Connect.cpp8
-rw-r--r--ACE/ace/os_include/os_stddef.h2
15 files changed, 69 insertions, 47 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 72c021ddeac..f889efe7bd5 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,23 @@
+Sun Jul 15 13:08:50 UTC 2007 Abdullah Sowayan <abdullah.sowayan@lmco.com>
+
+ * ace/Malloc.h:
+ * ace/OS_NS_stdio.inl:
+ * ace/OS_NS_stropts.cpp:
+ * ace/OS_NS_unistd.cpp:
+ * ace/Object_Manager_Base.cpp:
+ * ace/QoS/QoS_Session_Impl.cpp:
+ * ace/Rtems_init.c:
+ * ace/SOCK_Dgram.cpp:
+ * ace/SOCK_Dgram_Mcast.cpp:
+ * ace/SOCK_SEQPACK_Connector.inl:
+ * ace/SSL/SSL_Asynch_BIO.cpp:
+ * ace/SSL/SSL_Context.cpp:
+ * ace/Sock_Connect.cpp:
+ * ace/os_include/os_stddef.h:
+
+ Fixed Fuzz warnings regarding the usage of NULL. Prefer the usage of 0 instead
+ of NULL.
+
Sun Jul 15 04:21:44 UTC 2007 Phil Mesnier <mesnier_p@ociweb.com>
* bin/msvc_static_order.lst:
diff --git a/ACE/ace/Malloc.h b/ACE/ace/Malloc.h
index c0c76e6088e..5dd76d47dd3 100644
--- a/ACE/ace/Malloc.h
+++ b/ACE/ace/Malloc.h
@@ -106,7 +106,7 @@ typedef ACE_Atomic_Op<ACE_PROCESS_MUTEX, int> ACE_INT;
Control_Block.
+-----------------------------------------+
- |NAME_NODE_PTR name_head_; |<---- NULL
+ |NAME_NODE_PTR name_head_; |<---- NULL.
| // Entry point for double-linked list.|
| // Initialized to NULL pointer to |
| // indicate an empty list. |
diff --git a/ACE/ace/OS_NS_stdio.inl b/ACE/ace/OS_NS_stdio.inl
index dcd833e451b..cecb0d06324 100644
--- a/ACE/ace/OS_NS_stdio.inl
+++ b/ACE/ace/OS_NS_stdio.inl
@@ -1127,7 +1127,7 @@ ACE_OS::default_win32_security_attributes_r (LPSECURITY_ATTRIBUTES sa,
{
InitializeSecurityDescriptor
(sd_buffer, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl (sd_buffer, TRUE, NULL, FALSE);
+ SetSecurityDescriptorDacl (sd_buffer, TRUE, 0, FALSE);
sa_buffer->nLength = sizeof(SECURITY_ATTRIBUTES);
sa_buffer->lpSecurityDescriptor = sd_buffer;
sa_buffer->bInheritHandle = TRUE;
diff --git a/ACE/ace/OS_NS_stropts.cpp b/ACE/ace/OS_NS_stropts.cpp
index 97855b388e9..4bde7d4ae9c 100644
--- a/ACE/ace/OS_NS_stropts.cpp
+++ b/ACE/ace/OS_NS_stropts.cpp
@@ -90,13 +90,13 @@ ACE_OS::ioctl (ACE_HANDLE socket,
// Query for the buffer size.
int result = ::WSAIoctl ((ACE_SOCKET) socket,
io_control_code,
- NULL,
+ 0,
0,
&dwBufferLen,
sizeof (dwBufferLen),
bytes_returned,
- NULL,
- NULL);
+ 0,
+ 0);
if (result == SOCKET_ERROR)
@@ -125,13 +125,13 @@ ACE_OS::ioctl (ACE_HANDLE socket,
result = ::WSAIoctl ((ACE_SOCKET) socket,
io_control_code,
- NULL,
+ 0,
0,
qos,
dwBufferLen,
bytes_returned,
- NULL,
- NULL);
+ 0,
+ 0);
if (result == SOCKET_ERROR)
return result;
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp
index e13dac866ad..cf7b498dda4 100644
--- a/ACE/ace/OS_NS_unistd.cpp
+++ b/ACE/ace/OS_NS_unistd.cpp
@@ -342,7 +342,7 @@ ACE_OS::num_processors (void)
int num_processors;
int mib[2] = { CTL_HW, HW_NCPU };
size_t len = sizeof (num_processors);
- if (::sysctl (mib, 2, &num_processors, &len, NULL, 0) != -1)
+ if (::sysctl (mib, 2, &num_processors, &len, 0, 0) != -1)
return num_processors;
else
return -1;
@@ -374,7 +374,7 @@ ACE_OS::num_processors_online (void)
int num_processors;
int mib[2] = { CTL_HW, HW_NCPU };
size_t len = sizeof (num_processors);
- if (::sysctl (mib, 2, &num_processors, &len, NULL, 0) != -1)
+ if (::sysctl (mib, 2, &num_processors, &len, 0, 0) != -1)
return num_processors;
else
return -1;
diff --git a/ACE/ace/Object_Manager_Base.cpp b/ACE/ace/Object_Manager_Base.cpp
index d0ee232408c..1f7c89f422d 100644
--- a/ACE/ace/Object_Manager_Base.cpp
+++ b/ACE/ace/Object_Manager_Base.cpp
@@ -427,7 +427,7 @@ ACE_OS_Object_Manager::print_error_message (unsigned int line_number,
(ACE_TCHAR *) &lpMsgBuf,
0,
0);
- ::MessageBox (NULL,
+ ::MessageBox (0,
lpMsgBuf,
ACE_LIB_TEXT ("ACE_OS error"),
MB_OK);
diff --git a/ACE/ace/QoS/QoS_Session_Impl.cpp b/ACE/ace/QoS/QoS_Session_Impl.cpp
index b44a708d192..4e8de02a8ab 100644
--- a/ACE/ace/QoS/QoS_Session_Impl.cpp
+++ b/ACE/ace/QoS/QoS_Session_Impl.cpp
@@ -340,10 +340,10 @@ ACE_RAPI_Session::sending_qos (const ACE_QoS &ace_qos)
int result = rapi_sender (this->session_id_,
0,
0,
- NULL,
0,
- NULL,
- NULL,
+ 0,
+ 0,
+ 0,
25) ;
if (result != 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -404,20 +404,20 @@ ACE_RAPI_Session::sending_qos (const ACE_QoS &ace_qos)
int result = rapi_sender(this->session_id_,
0,
(sockaddr *) this->src_addr_->get_addr (),
- NULL,
+ 0,
t_spec,
- NULL,
- NULL,
+ 0,
+ 0,
sending_flowspec->ttl ()) ;
/*
int result = rapi_sender(this->session_id_,
0,
(sockaddr *) sender_addr.get_addr (),
- NULL,
+ 0,
t_spec,
- NULL,
- NULL,
+ 0,
+ 0,
sending_flowspec->ttl ()) ;
*/
if(result!= 0)
@@ -449,10 +449,10 @@ ACE_RAPI_Session::receiving_qos (const ACE_QoS &ace_qos)
RAPI_RSTYLE_WILDCARD,
// This applies the flowspec to all the senders. Given this,
// @@I am passing the filter_spec to be null, hoping this will work.
- NULL,
- NULL,
0,
- NULL,
+ 0,
+ 0,
+ 0,
// The filter spec is NULL. This should work since the RSTYLE is
// WILDCARD.
0,
@@ -517,10 +517,10 @@ ACE_RAPI_Session::receiving_qos (const ACE_QoS &ace_qos)
RAPI_RSTYLE_WILDCARD,
// This applies the flowspec to all the senders. Given this,
// @@I am passing the filter_spec to be null, hoping this will work.
- NULL,
- NULL,
0,
- NULL,
+ 0,
+ 0,
+ 0,
// The filter spec is NULL. This should work since the RSTYLE is
// WILDCARD.
1,
diff --git a/ACE/ace/Rtems_init.c b/ACE/ace/Rtems_init.c
index b0c548c4fd3..fd8a2e24c6c 100644
--- a/ACE/ace/Rtems_init.c
+++ b/ACE/ace/Rtems_init.c
@@ -104,7 +104,7 @@ static struct rtems_bsdnet_ifconfig loopback_config = {
"lo0", /* name */
rtems_bsdnet_loopattach, /* attach function */
- NULL, /* link to next interface */
+ 0, /* link to next interface */
"127.0.0.1", /* IP address */
"255.0.0.0", /* IP net mask */
@@ -122,12 +122,12 @@ static struct rtems_bsdnet_ifconfig netdriver_config = {
#ifdef RTEMS_USE_LOOPBACK
&loopback_config, /* link to next interface */
#else
- NULL, /* No more interfaces */
+ 0, /* No more interfaces */
#endif
#if (defined (RTEMS_USE_BOOTP))
- NULL, /* BOOTP supplies IP address */
- NULL, /* BOOTP supplies IP net mask */
+ 0, /* BOOTP supplies IP address */
+ 0, /* BOOTP supplies IP net mask */
#else
"XXX.YYY.ZZZ.XYZ", /* IP address */
"255.255.255.0", /* IP net mask */
@@ -136,7 +136,7 @@ static struct rtems_bsdnet_ifconfig netdriver_config = {
#if (defined (RTEMS_SET_ETHERNET_ADDRESS))
ethernet_address, /* Ethernet hardware address */
#else
- NULL, /* Driver supplies hardware address */
+ 0, /* Driver supplies hardware address */
#endif
0 /* Use default driver parameters */
};
@@ -151,7 +151,7 @@ struct rtems_bsdnet_config rtems_bsdnet_config = {
#if (defined (RTEMS_USE_BOOTP))
rtems_bsdnet_do_bootp,
#else
- NULL,
+ 0,
#endif
0, /* Default network task priority */
diff --git a/ACE/ace/SOCK_Dgram.cpp b/ACE/ace/SOCK_Dgram.cpp
index e58401bdcb7..6ed05164a3e 100644
--- a/ACE/ace/SOCK_Dgram.cpp
+++ b/ACE/ace/SOCK_Dgram.cpp
@@ -687,7 +687,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq,
ULONG bufLen = 0;
if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6,
0,
- NULL,
+ 0,
&tmp_addrs,
&bufLen)) != ERROR_BUFFER_OVERFLOW)
return -1; // With output bufferlength 0 this can't be right.
@@ -701,7 +701,7 @@ ACE_SOCK_Dgram::make_multicast_ifaddr6 (ipv6_mreq *ret_mreq,
pAddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES> (buf);
if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6,
0,
- NULL,
+ 0,
pAddrs,
&bufLen)) != NO_ERROR)
{
diff --git a/ACE/ace/SOCK_Dgram_Mcast.cpp b/ACE/ace/SOCK_Dgram_Mcast.cpp
index 5f325a7e519..0b2f61056c3 100644
--- a/ACE/ace/SOCK_Dgram_Mcast.cpp
+++ b/ACE/ace/SOCK_Dgram_Mcast.cpp
@@ -289,7 +289,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
ULONG bufLen = 0;
if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6,
0,
- NULL,
+ 0,
&tmp_addrs,
&bufLen)) != ERROR_BUFFER_OVERFLOW)
return -1; // With output bufferlength 0 this can't be right.
@@ -303,7 +303,7 @@ ACE_SOCK_Dgram_Mcast::subscribe_ifs (const ACE_INET_Addr &mcast_addr,
pAddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES> (buf);
if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6,
0,
- NULL,
+ 0,
pAddrs,
&bufLen)) != NO_ERROR)
{
@@ -673,7 +673,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
ULONG bufLen = 0;
if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6,
0,
- NULL,
+ 0,
&tmp_addrs,
&bufLen)) != ERROR_BUFFER_OVERFLOW)
return -1; // With output bufferlength 0 this can't be right.
@@ -687,7 +687,7 @@ ACE_SOCK_Dgram_Mcast::unsubscribe_ifs (const ACE_INET_Addr &mcast_addr,
pAddrs = reinterpret_cast<PIP_ADAPTER_ADDRESSES> (buf);
if ((dwRetVal = ::GetAdaptersAddresses (AF_INET6,
0,
- NULL,
+ 0,
pAddrs,
&bufLen)) != NO_ERROR)
{
diff --git a/ACE/ace/SOCK_SEQPACK_Connector.inl b/ACE/ace/SOCK_SEQPACK_Connector.inl
index a89c41f4069..c932ad2eed6 100644
--- a/ACE/ace/SOCK_SEQPACK_Connector.inl
+++ b/ACE/ace/SOCK_SEQPACK_Connector.inl
@@ -27,7 +27,7 @@ ACE_SOCK_SEQPACK_Connector::reset_new_handle (ACE_HANDLE handle)
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
// Reset the event association
return ::WSAEventSelect ((SOCKET) handle,
- NULL,
+ 0,
0);
#else /* !defined ACE_HAS_WINSOCK2 */
ACE_UNUSED_ARG (handle);
diff --git a/ACE/ace/SSL/SSL_Asynch_BIO.cpp b/ACE/ace/SSL/SSL_Asynch_BIO.cpp
index 9e27ab1348f..b287cf80ac8 100644
--- a/ACE/ace/SSL/SSL_Asynch_BIO.cpp
+++ b/ACE/ace/SSL/SSL_Asynch_BIO.cpp
@@ -54,11 +54,11 @@ static BIO_METHOD methods_ACE =
ACE_ASYNCH_BIO_WRITE_NAME,
ACE_ASYNCH_BIO_READ_NAME,
ACE_ASYNCH_BIO_PUTS_NAME,
- NULL, /* ACE_ASYNCH_BIO_GETS_NAME, */
+ 0, /* ACE_ASYNCH_BIO_GETS_NAME, */
ACE_ASYNCH_BIO_CTRL_NAME,
ACE_ASYNCH_BIO_NEW_NAME,
ACE_ASYNCH_BIO_FREE_NAME,
- NULL
+ 0
};
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
diff --git a/ACE/ace/SSL/SSL_Context.cpp b/ACE/ace/SSL/SSL_Context.cpp
index b41a9b725e8..da8e1438241 100644
--- a/ACE/ace/SSL/SSL_Context.cpp
+++ b/ACE/ace/SSL/SSL_Context.cpp
@@ -598,13 +598,13 @@ ACE_SSL_Context::dh_params (const char *file_name,
DH * ret=0;
BIO * bio = 0;
- if ((bio = ::BIO_new_file (this->dh_params_.file_name (), "r")) == NULL)
+ if ((bio = ::BIO_new_file (this->dh_params_.file_name (), "r")) == 0)
{
this->dh_params_ = ACE_SSL_Data_File ();
return -1;
}
- ret = PEM_read_bio_DHparams (bio, NULL, NULL, NULL);
+ ret = PEM_read_bio_DHparams (bio, 0, 0, 0);
BIO_free (bio);
if (ret == 0)
diff --git a/ACE/ace/Sock_Connect.cpp b/ACE/ace/Sock_Connect.cpp
index 8325e0d3f07..e06ca9bcaaa 100644
--- a/ACE/ace/Sock_Connect.cpp
+++ b/ACE/ace/Sock_Connect.cpp
@@ -542,7 +542,7 @@ get_ip_interfaces_win32 (size_t &count,
RetVal =
GetAdaptersAddresses(AF_UNSPEC,
0,
- NULL,
+ 0,
AdapterAddresses,
&OutBufferLength);
@@ -557,7 +557,7 @@ get_ip_interfaces_win32 (size_t &count,
RetVal =
GetAdaptersAddresses(AF_UNSPEC,
0,
- NULL,
+ 0,
AdapterAddresses,
&OutBufferLength);
@@ -1395,7 +1395,7 @@ ACE::get_ip_interfaces (size_t &count,
hints.ai_flags = AI_NUMERICHOST;
hints.ai_family = AF_INET6;
- if ((fp = ACE_OS::fopen (ACE_LIB_TEXT ("/proc/net/if_inet6"), ACE_LIB_TEXT ("r"))) != NULL)
+ if ((fp = ACE_OS::fopen (ACE_LIB_TEXT ("/proc/net/if_inet6"), ACE_LIB_TEXT ("r"))) != 0)
{
while (fscanf (fp,
"%4s%4s%4s%4s%4s%4s%4s%4s %02x %*02x %*02x %*02x %*8s\n",
@@ -1546,7 +1546,7 @@ return 0;
# if defined (ACE_HAS_IPV6)
FILE* fp = 0;
- if ((fp = ACE_OS::fopen (ACE_LIB_TEXT ("/proc/net/if_inet6"), ACE_LIB_TEXT ("r"))) != NULL)
+ if ((fp = ACE_OS::fopen (ACE_LIB_TEXT ("/proc/net/if_inet6"), ACE_LIB_TEXT ("r"))) != 0)
{
// Scan the lines according to the expected format but don't really read any input
while (fscanf (fp, "%*32s %*02x %*02x %*02x %*02x %*8s\n") != EOF)
diff --git a/ACE/ace/os_include/os_stddef.h b/ACE/ace/os_include/os_stddef.h
index 87bcbdd2e36..1c047ac1983 100644
--- a/ACE/ace/os_include/os_stddef.h
+++ b/ACE/ace/os_include/os_stddef.h
@@ -36,6 +36,7 @@ extern "C"
{
#endif /* __cplusplus */
+//FUZZ: disable check_for_NULL
// NULL pointer constant
#if defined (ACE_LACKS_NULL)
# undef NULL
@@ -45,6 +46,7 @@ extern "C"
# define NULL ((void *)0)
# endif
#endif /* ACE_LACKS_NULL */
+//FUZZ: enable check_for_NULL
/*
Integer constant expression of type size_t, the value of which is the offset