forked from Imagelibrary/rtems
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
Coverity Id 10 * libblock/src/bdbuf.c: Rework loop conditional to avoid potential use of NULL pointer.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
Coverity Id 10
|
||||||
|
* libblock/src/bdbuf.c: Rework loop conditional to avoid potential use
|
||||||
|
of NULL pointer.
|
||||||
|
|
||||||
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
Coverity Id 23
|
Coverity Id 23
|
||||||
|
|||||||
@@ -2253,6 +2253,7 @@ rtems_bdbuf_null_disk_ioctl (rtems_disk_device *dd, uint32_t req, void *arg)
|
|||||||
static void
|
static void
|
||||||
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
|
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
|
||||||
{
|
{
|
||||||
|
rtems_chain_node *node;
|
||||||
static rtems_disk_device null_disk = {
|
static rtems_disk_device null_disk = {
|
||||||
.capabilities = 0,
|
.capabilities = 0,
|
||||||
.ioctl = rtems_bdbuf_null_disk_ioctl
|
.ioctl = rtems_bdbuf_null_disk_ioctl
|
||||||
@@ -2301,12 +2302,10 @@ rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
|
|||||||
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
|
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
|
||||||
transfer->write_req->bufnum = 0;
|
transfer->write_req->bufnum = 0;
|
||||||
|
|
||||||
while (!rtems_chain_is_empty (&transfer->bds))
|
while ((node = rtems_chain_get(&transfer->bds)) != NULL)
|
||||||
{
|
{
|
||||||
rtems_bdbuf_buffer* bd =
|
rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
|
||||||
(rtems_bdbuf_buffer*) rtems_chain_get (&transfer->bds);
|
bool write = false;
|
||||||
|
|
||||||
bool write = false;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the device only accepts sequential buffers and this is not the
|
* If the device only accepts sequential buffers and this is not the
|
||||||
|
|||||||
Reference in New Issue
Block a user