summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-12-06 07:12:42 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-12-06 07:12:42 +0000
commit04bf7cbf607fdf0cda44396a00baf98f66f34fe0 (patch)
tree933fab24a55b84806bacbbc635376b0c72126b43 /cpukit
parente2bcb3217beeecc97abb651dbc89f9729b72bc50 (diff)
downloadrtems-04bf7cbf607fdf0cda44396a00baf98f66f34fe0.tar.bz2
2011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/src/schedulercbsattachthread.c, score/src/schedulercbsdestroyserver.c, score/src/schedulercbsdetachthread.c, score/src/schedulercbsgetapprovedbudget.c, score/src/schedulercbsgetexecutiontime.c, score/src/schedulercbsgetparameters.c, score/src/schedulercbsgetremainingbudget.c, score/src/schedulercbssetparameters.c: Remove checks for server_id < 0 (server_id is unsigned).
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog12
-rw-r--r--cpukit/score/src/schedulercbsattachthread.c2
-rw-r--r--cpukit/score/src/schedulercbsdestroyserver.c2
-rw-r--r--cpukit/score/src/schedulercbsdetachthread.c2
-rw-r--r--cpukit/score/src/schedulercbsgetapprovedbudget.c2
-rw-r--r--cpukit/score/src/schedulercbsgetexecutiontime.c2
-rw-r--r--cpukit/score/src/schedulercbsgetparameters.c2
-rw-r--r--cpukit/score/src/schedulercbsgetremainingbudget.c2
-rw-r--r--cpukit/score/src/schedulercbssetparameters.c2
9 files changed, 20 insertions, 8 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index a2cfc0f9cc..0070a83228 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,17 @@
2011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>
+ * score/src/schedulercbsattachthread.c,
+ score/src/schedulercbsdestroyserver.c,
+ score/src/schedulercbsdetachthread.c,
+ score/src/schedulercbsgetapprovedbudget.c,
+ score/src/schedulercbsgetexecutiontime.c,
+ score/src/schedulercbsgetparameters.c,
+ score/src/schedulercbsgetremainingbudget.c,
+ score/src/schedulercbssetparameters.c:
+ Remove checks for server_id < 0 (server_id is unsigned).
+
+2011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>
+
* posix/src/pspinlocktranslatereturncode.c:
Include <rtems/posix/spinlock.h> (Missing prototypes).
* libfs/src/imfs/imfs_debug.c: Make IMFS_print_jnode,
diff --git a/cpukit/score/src/schedulercbsattachthread.c b/cpukit/score/src/schedulercbsattachthread.c
index 7796f12a6b..0643b193f4 100644
--- a/cpukit/score/src/schedulercbsattachthread.c
+++ b/cpukit/score/src/schedulercbsattachthread.c
@@ -28,7 +28,7 @@ int _Scheduler_CBS_Attach_thread (
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
the_thread = _Thread_Get(task_id, &location);
diff --git a/cpukit/score/src/schedulercbsdestroyserver.c b/cpukit/score/src/schedulercbsdestroyserver.c
index 85867cf7dc..2b11922812 100644
--- a/cpukit/score/src/schedulercbsdestroyserver.c
+++ b/cpukit/score/src/schedulercbsdestroyserver.c
@@ -25,7 +25,7 @@ int _Scheduler_CBS_Destroy_server (
int ret = SCHEDULER_CBS_OK;
rtems_id tid;
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
diff --git a/cpukit/score/src/schedulercbsdetachthread.c b/cpukit/score/src/schedulercbsdetachthread.c
index 6ac8881ae0..71e2214e61 100644
--- a/cpukit/score/src/schedulercbsdetachthread.c
+++ b/cpukit/score/src/schedulercbsdetachthread.c
@@ -33,7 +33,7 @@ int _Scheduler_CBS_Detach_thread (
_Thread_Enable_dispatch();
}
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
diff --git a/cpukit/score/src/schedulercbsgetapprovedbudget.c b/cpukit/score/src/schedulercbsgetapprovedbudget.c
index 14db13031f..369d39378a 100644
--- a/cpukit/score/src/schedulercbsgetapprovedbudget.c
+++ b/cpukit/score/src/schedulercbsgetapprovedbudget.c
@@ -23,7 +23,7 @@ int _Scheduler_CBS_Get_approved_budget (
time_t *approved_budget
)
{
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
diff --git a/cpukit/score/src/schedulercbsgetexecutiontime.c b/cpukit/score/src/schedulercbsgetexecutiontime.c
index 2461d76816..5cea3101c0 100644
--- a/cpukit/score/src/schedulercbsgetexecutiontime.c
+++ b/cpukit/score/src/schedulercbsgetexecutiontime.c
@@ -27,7 +27,7 @@ int _Scheduler_CBS_Get_execution_time (
Objects_Locations location;
Thread_Control *the_thread;
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
diff --git a/cpukit/score/src/schedulercbsgetparameters.c b/cpukit/score/src/schedulercbsgetparameters.c
index 450afd0d68..9bbedfbde2 100644
--- a/cpukit/score/src/schedulercbsgetparameters.c
+++ b/cpukit/score/src/schedulercbsgetparameters.c
@@ -23,7 +23,7 @@ int _Scheduler_CBS_Get_parameters (
Scheduler_CBS_Parameters *params
)
{
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
diff --git a/cpukit/score/src/schedulercbsgetremainingbudget.c b/cpukit/score/src/schedulercbsgetremainingbudget.c
index 664c7e1bc4..bb394c87f1 100644
--- a/cpukit/score/src/schedulercbsgetremainingbudget.c
+++ b/cpukit/score/src/schedulercbsgetremainingbudget.c
@@ -26,7 +26,7 @@ int _Scheduler_CBS_Get_remaining_budget (
Objects_Locations location;
Thread_Control *the_thread;
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
diff --git a/cpukit/score/src/schedulercbssetparameters.c b/cpukit/score/src/schedulercbssetparameters.c
index 4268110364..99f80635b4 100644
--- a/cpukit/score/src/schedulercbssetparameters.c
+++ b/cpukit/score/src/schedulercbssetparameters.c
@@ -23,7 +23,7 @@ int _Scheduler_CBS_Set_parameters (
Scheduler_CBS_Parameters *params
)
{
- if ( server_id < 0 || server_id >= _Scheduler_CBS_Maximum_servers )
+ if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( params->budget <= 0 ||