summaryrefslogtreecommitdiff
path: root/performance-tests
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-11-08 18:54:18 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-11-08 18:54:18 +0000
commit7256fd07163835f7a551ff6a984ac53dc98c789c (patch)
tree32777251a9684ab8c8106b2ae97e9b4e02599690 /performance-tests
parent7aa7ce45fa0d6247418394dbbd7f9a1baf3176a1 (diff)
downloadATCD-7256fd07163835f7a551ff6a984ac53dc98c789c.tar.gz
(get_options): DEC CXX didn't like conversion of -1 to u_int, so changed return type to int and all ACE_ERROR_RETURNs to return -1
Diffstat (limited to 'performance-tests')
-rw-r--r--performance-tests/Misc/preempt.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/performance-tests/Misc/preempt.cpp b/performance-tests/Misc/preempt.cpp
index 791a280d928..5007bdbcc8c 100644
--- a/performance-tests/Misc/preempt.cpp
+++ b/performance-tests/Misc/preempt.cpp
@@ -231,7 +231,7 @@ Low_Priority_Task::svc (void)
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
-static u_int
+static int
get_options (int argc, char *argv[])
{
ACE_Get_Opt get_opt (argc, argv, "c:n:p:y?");
@@ -242,20 +242,20 @@ get_options (int argc, char *argv[])
if (ACE_OS::atoi (get_opt.optarg) >= 2)
iterations = ACE_OS::atoi (get_opt.optarg);
else
- ACE_ERROR_RETURN ((LM_ERROR, "%n: iterations must be >= 2\n"), 1);
+ ACE_ERROR_RETURN ((LM_ERROR, "%n: iterations must be >= 2\n"), -1);
break;
case 'n':
if (ACE_OS::atoi (get_opt.optarg) >= 1)
high_priority_tasks = ACE_OS::atoi (get_opt.optarg);
else
ACE_ERROR_RETURN ((LM_ERROR, "%n: number of high priority threads "
- "must be >= 1\n"), 1);
+ "must be >= 1\n"), -1);
break;
case 'p':
if (ACE_OS::atoi (get_opt.optarg) > 0)
read_period = ACE_OS::atoi (get_opt.optarg);
else
- ACE_ERROR_RETURN ((LM_ERROR, "%n: read period > 0\n"), (u_int) -1);
+ ACE_ERROR_RETURN ((LM_ERROR, "%n: read period > 0\n"), -1);
break;
case 'y':
low_yield = 1;
@@ -265,8 +265,8 @@ get_options (int argc, char *argv[])
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "%n: unknown arg, %c\n"
- "usage: %n %s\n", opt, usage), 1);
+ "%n: unknown arg, %c\nusage: %n %s\n", opt, usage),
+ -1);
}
}
@@ -276,8 +276,8 @@ get_options (int argc, char *argv[])
break;
default:
ACE_ERROR_RETURN ((LM_ERROR,
- "%n: too many arguments\n"
- "usage: %n %s\n", usage), 1);
+ "%n: too many arguments\nusage: %n %s\n", usage),
+ -1);
}
return 0;