summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-11-24 11:59:51 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-11-24 11:59:51 +0000
commit88801be3df4256dcd74a71ea14a13601eeaff741 (patch)
tree0ba2881dd43ad98d65a5be5ec0e3f858ae098233 /performance-tests
parent68f543c2c36d1cb9ce788a600a46494b763d9e50 (diff)
downloadATCD-88801be3df4256dcd74a71ea14a13601eeaff741.tar.gz
ChangeLogTag: Wed Nov 24 11:59:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/SCTP/Options_Manager.cpp2
-rw-r--r--performance-tests/SCTP/SOCK_SEQPACK_clt.cpp8
-rw-r--r--performance-tests/SCTP/SOCK_SEQPACK_srv.cpp8
-rw-r--r--performance-tests/SCTP/SOCK_STREAM_clt.cpp6
-rw-r--r--performance-tests/SCTP/SOCK_STREAM_srv.cpp6
-rw-r--r--performance-tests/SCTP/hist.cpp20
6 files changed, 25 insertions, 25 deletions
diff --git a/performance-tests/SCTP/Options_Manager.cpp b/performance-tests/SCTP/Options_Manager.cpp
index 656030a6195..b386f939d72 100644
--- a/performance-tests/SCTP/Options_Manager.cpp
+++ b/performance-tests/SCTP/Options_Manager.cpp
@@ -69,7 +69,7 @@ Options_Manager::Options_Manager(int argc, ACE_TCHAR **argv, ACE_TCHAR const * c
// Declare options with ACE_Get_Opt
int c;
- ACE_Get_Opt * get_opt=NULL;
+ ACE_Get_Opt * get_opt = 0;
if (!ACE_OS::strcmp(ACE_TEXT ("client-opts"), opts_set)){
get_opt = new ACE_Get_Opt(argc, argv, ACE_TEXT("c:nt:m:M:x:b:C:i:p:H:s:h"));
diff --git a/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp b/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp
index 983fce66629..ebb8a0defa5 100644
--- a/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp
+++ b/performance-tests/SCTP/SOCK_SEQPACK_clt.cpp
@@ -95,7 +95,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR **argv){
1);
// run the test
- HIST testResultsHistogram = NULL;
+ HIST testResultsHistogram = 0;
// connection is closed by runTest* functions
testResultsHistogram = runTest(dataStream);
@@ -208,9 +208,9 @@ HIST runUnmarshalledOctetTest(ACE_CDR::Octet *buf, size_t seqLen, ACE_SOCK_SEQPA
}
// AFTER PRIMING THE PUMP CREATE THE HISTOGRAM
- HIST aceStream_hist=NULL;
+ HIST aceStream_hist = 0;
aceStream_hist = createHistogram(msgLen);
- if (NULL == aceStream_hist)
+ if (0 == aceStream_hist)
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT ("%p\n"),
ACE_TEXT ("histogram create failed")),
@@ -289,7 +289,7 @@ HIST runTest(ACE_SOCK_SEQPACK_Association & stream)
size_t msgLen = 1;
for (int i=1; i <= Options_Manager::payload_size_power_of_2; i++)
msgLen *= 2;
-
+
// send a header to the server that contains test parameters
diff --git a/performance-tests/SCTP/SOCK_SEQPACK_srv.cpp b/performance-tests/SCTP/SOCK_SEQPACK_srv.cpp
index 105bbb14fab..c18ec8e5300 100644
--- a/performance-tests/SCTP/SOCK_SEQPACK_srv.cpp
+++ b/performance-tests/SCTP/SOCK_SEQPACK_srv.cpp
@@ -65,7 +65,7 @@ static ACE_THR_FUNC_RETURN unmarshalledOctetServer (void *arg){
msgBufSize = ACE_NTOHL(msgBufSize);
// allocate the buffer for the message payload
- ACE_CDR::Octet * msgBuf=NULL;
+ ACE_CDR::Octet * msgBuf = 0;
ACE_NEW_RETURN(msgBuf,
ACE_CDR::Octet[msgBufSize],
0);
@@ -96,7 +96,7 @@ static ACE_THR_FUNC_RETURN unmarshalledOctetServer (void *arg){
dataModeStream->close();
delete dataModeStream;
- return NULL;
+ return 0;
}
// sets up the dataModeSocket Stream, reads the test header infomation
@@ -278,8 +278,8 @@ int ACE_TMAIN (int argc, ACE_TCHAR **argv){
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) Accepting connections, using %C on ")
ACE_TEXT ("port %u on interfaces %C"),
- (optsMgr.test_transport_protocol == IPPROTO_SCTP) ? "IPPROTO_SCTP" : "IPPROTO_TCP",
- serverAddr.get_port_number(),
+ (optsMgr.test_transport_protocol == IPPROTO_SCTP) ? "IPPROTO_SCTP" : "IPPROTO_TCP",
+ serverAddr.get_port_number(),
ACE_OS::inet_ntoa( addresses[0].sin_addr) ));
unsigned int i;
diff --git a/performance-tests/SCTP/SOCK_STREAM_clt.cpp b/performance-tests/SCTP/SOCK_STREAM_clt.cpp
index 6f4aadbf392..9437f08726d 100644
--- a/performance-tests/SCTP/SOCK_STREAM_clt.cpp
+++ b/performance-tests/SCTP/SOCK_STREAM_clt.cpp
@@ -95,7 +95,7 @@ int ACE_TMAIN (int argc, ACE_TCHAR **argv){
1);
// run the test
- HIST testResultsHistogram = NULL;
+ HIST testResultsHistogram = 0;
// connection is closed by runTest* functions
testResultsHistogram = runTest(dataStream);
@@ -218,9 +218,9 @@ HIST runUnmarshalledOctetTest(ACE_CDR::Octet *buf, size_t seqLen, ACE_SOCK_Strea
}
// AFTER PRIMING THE PUMP CREATE THE HISTOGRAM
- HIST aceStream_hist=NULL;
+ HIST aceStream_hist = 0;
aceStream_hist = createHistogram(msgLen);
- if (NULL == aceStream_hist)
+ if (0 == aceStream_hist)
ACE_ERROR_RETURN((LM_ERROR,
"%p\n",
"histogram create failed"),
diff --git a/performance-tests/SCTP/SOCK_STREAM_srv.cpp b/performance-tests/SCTP/SOCK_STREAM_srv.cpp
index 5c75a2585fe..3c40f7a8ba0 100644
--- a/performance-tests/SCTP/SOCK_STREAM_srv.cpp
+++ b/performance-tests/SCTP/SOCK_STREAM_srv.cpp
@@ -24,7 +24,7 @@ extern "C" {
};
#else
#ifndef IPPROTO_SCTP
-#define IPPROTO_SCTP 132 /* always the same value on every platform */
+#define IPPROTO_SCTP 132 /* always the same value on every platform */
#endif
#define SCTP_NODELAY -1
#endif
@@ -64,7 +64,7 @@ static ACE_THR_FUNC_RETURN unmarshalledOctetServer (void *arg){
msgBufSize = ACE_NTOHL(msgBufSize);
// allocate the buffer for the message payload
- ACE_CDR::Octet * msgBuf=NULL;
+ ACE_CDR::Octet * msgBuf = 0;
ACE_NEW_RETURN(msgBuf,
ACE_CDR::Octet[msgBufSize],
0);
@@ -95,7 +95,7 @@ static ACE_THR_FUNC_RETURN unmarshalledOctetServer (void *arg){
dataModeStream->close();
delete dataModeStream;
- return NULL;
+ return 0;
}
// sets up the dataModeSocket Stream, reads the test header infomation
diff --git a/performance-tests/SCTP/hist.cpp b/performance-tests/SCTP/hist.cpp
index 81197b7939e..beeb880280c 100644
--- a/performance-tests/SCTP/hist.cpp
+++ b/performance-tests/SCTP/hist.cpp
@@ -37,11 +37,11 @@ hist_t *head_hist, *tail_hist;
hist_t *histogram(char *name, unsigned int num_bins, double first,
double last) {
hist_t *hist;
- if ((hist = (hist_t *)malloc(sizeof(hist_t))) == NULL) {
+ if ((hist = (hist_t *)malloc(sizeof(hist_t))) == 0) {
fprintf(stderr, "unable to allocate memory for histogram : %s", name);
exit(-1);
}
- if ((hist->hs = (unsigned int *)malloc(sizeof(unsigned int) * (num_bins+2))) == NULL){
+ if ((hist->hs = (unsigned int *)malloc(sizeof(unsigned int) * (num_bins+2))) == 0){
fprintf(stderr, "unable to allocate memory for histogram : %s", name);
exit(-1);
}
@@ -58,11 +58,11 @@ hist_t *histogram(char *name, unsigned int num_bins, double first,
hist->sum4 = 0.0;
hist->max = DBL_MIN;
hist->min = DBL_MAX;
- hist->outer = NULL;
- hist->next = NULL;
+ hist->outer = 0;
+ hist->next = 0;
hist->skew = 0;
- hist->firstoptheader = NULL;
- if(head_hist == NULL)
+ hist->firstoptheader = 0;
+ if(head_hist == 0)
head_hist = tail_hist = hist;
else {
tail_hist->next = hist;
@@ -90,16 +90,16 @@ void add_field(char *key, char *value, hist_t *hist) {
nextoptheader = (struct optheader *) malloc(sizeof(struct optheader));
nextoptheader->key = (char *) malloc(strlen(key)+1);
nextoptheader->value = (char *) malloc(strlen(value)+1);
- nextoptheader->next = NULL;
+ nextoptheader->next = 0;
strcpy(nextoptheader->key,key);
strcpy(nextoptheader->value,value);
/* tack nextoptheader onto end of optheader list */
- if (hist->firstoptheader == NULL) {
+ if (hist->firstoptheader == 0) {
hist->firstoptheader = nextoptheader;
} else {
trace = hist->firstoptheader;
- while (trace->next != NULL) {
+ while (trace->next != 0) {
trace = trace->next;
}
trace->next = nextoptheader;
@@ -185,7 +185,7 @@ void report_to(FILE *strm, hist_t *hist) {
fprintf(strm, "num_bins: %d %g %g\n", hist->num_bins,hist->first,hist->last);
if (hist->firstoptheader) {
trace = hist->firstoptheader;
- while(trace->next != NULL) {
+ while(trace->next != 0) {
fprintf(strm, "%s: %s\n", trace->key, trace->value);
trace = trace->next;
}