Changeset a518defe in rtems for cpukit/libblock


Ignore:
Timestamp:
Jan 19, 2010, 11:54:17 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
8bffc40b
Parents:
c917d31
Message:

2010-01-19 Joel Sherrill <joel.sherrill@…>

Coverity Id 10

  • libblock/src/bdbuf.c: Rework loop conditional to avoid potential use of NULL pointer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libblock/src/bdbuf.c

    rc917d31 ra518defe  
    22542254rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
    22552255{
     2256  rtems_chain_node *node;
    22562257  static rtems_disk_device null_disk = {
    22572258    .capabilities = 0,
     
    23022303    transfer->write_req->bufnum = 0;
    23032304
    2304     while (!rtems_chain_is_empty (&transfer->bds))
    2305     {
    2306       rtems_bdbuf_buffer* bd =
    2307         (rtems_bdbuf_buffer*) rtems_chain_get (&transfer->bds);
    2308 
    2309       bool write = false;
     2305    while ((node = rtems_chain_get(&transfer->bds)) != NULL)
     2306    {
     2307      rtems_bdbuf_buffer* bd = (rtems_bdbuf_buffer*) node;
     2308      bool                write = false;
    23102309
    23112310      /*
Note: See TracChangeset for help on using the changeset viewer.