Opened on 05/13/09 at 10:18:52
Closed on 05/13/09 at 16:02:37
#1411 closed defect (fixed)
typo in rtems_workspace_allocate
Reported by: | Nickolay Semyonov-Kolchin | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 4.10 |
Component: | score | Version: | 4.9 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Our partners found that cpukit/rtems/src/workspace.c:rtems_workspace_allocate contain incorrect pointer check.
bool rtems_workspace_allocate(
size_t bytes,
void pointer
)
{
*pointer = _Heap_Allocate( &_Workspace_Area, bytes );
if (!pointer)
return false;
else
return true;
}
the '!pointer' check is useless. Probably '*pointer == 0' should be used.
This bug is present in RTEMS 4.9 and current CVS.
Attachments (2)
Change History (4)
Changed on 05/13/09 at 10:18:52 by Nickolay Semyonov-Kolchin
Changed on 05/13/09 at 15:49:43 by Joel Sherrill
Attachment: | pr1411.diff added |
---|
Patch for 4.10 and 4.9
comment:1 Changed on 05/13/09 at 15:49:43 by Joel Sherrill
attachments.isobsolete: | 0 → 1 |
---|
comment:2 Changed on 05/13/09 at 16:02:37 by Joel Sherrill
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch committed. PR closed.
Note: See
TracTickets for help on using
tickets.
trivial patch