Ignore:
Timestamp:
Aug 10, 2017, 11:21:16 PM (8 years ago)
Author:
David Azarewicz
Message:

Misc fixes. NULL pointer fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/ctxhook.c

    r184 r191  
    104104  D32ThunkStackTo32();
    105105
    106   vNext = NULL;
     106  vNext = FAR16NULL;
    107107  rearm_ctx_hook = 0;
    108108
     
    131131        /* restart this port */
    132132        port_mmio = port_base(ai, p);
    133         vProblemIorb = NULL;
     133        vProblemIorb = FAR16NULL;
    134134        need_reset = 0;
    135135
     
    140140        DPRINTF(8," PORT_CMD      = 0x%x\n", ccs);
    141141
    142         for (vIorb = ai->ports[p].iorb_queue.vRoot; vIorb != NULL; vIorb = vNext)
     142        for (vIorb = ai->ports[p].iorb_queue.vRoot; vIorb != FAR16NULL; vIorb = vNext)
    143143        {
    144144          IORBH *pIorb = Far16ToFlat(vIorb);
     
    180180              {
    181181                /* no further analysis -- we're done with this one */
    182                 vProblemIorb = NULL;
     182                vProblemIorb = FAR16NULL;
    183183              }
    184184            }
     
    223223        ai->ports[p].cmd_slot = 0;
    224224
    225         if (vProblemIorb != NULL)
     225        if (vProblemIorb != FAR16NULL)
    226226        {
    227227          IORBH *pProblemIorb = Far16ToFlat(vProblemIorb);
     
    271271
    272272  /* call notification routine on all IORBs which have completed */
    273   for (vIorb = done_queue.vRoot; vIorb != NULL; vIorb = vNext)
     273  for (vIorb = done_queue.vRoot; vIorb != FAR16NULL; vIorb = vNext)
    274274  {
    275275    IORBH *pIorb = Far16ToFlat(vIorb);
     
    339339  D32ThunkStackTo32();
    340340
    341   vNext = NULL;
     341  vNext = FAR16NULL;
    342342  rearm_ctx_hook = 0;
    343343
     
    355355
    356356  /* add ports of active IORBs from the abort queue to ports_to_reset[] */
    357   for (vIorb = abort_queue.vRoot; vIorb != NULL; vIorb = vNext)
     357  for (vIorb = abort_queue.vRoot; vIorb != FAR16NULL; vIorb = vNext)
    358358  {
    359359    IORBH *pIorb = Far16ToFlat(vIorb);
     
    417417
    418418        /* retry or abort all remaining active commands on this port */
    419         for (vIorb = ai->ports[p].iorb_queue.vRoot; vIorb != NULL; vIorb = vNext)
     419        for (vIorb = ai->ports[p].iorb_queue.vRoot; vIorb != FAR16NULL; vIorb = vNext)
    420420        {
    421421          IORBH *pIorb = Far16ToFlat(vIorb);
     
    448448
    449449  /* complete all aborted IORBs */
    450   for (vIorb = done_queue.vRoot; vIorb != NULL; vIorb = vNext)
     450  for (vIorb = done_queue.vRoot; vIorb != FAR16NULL; vIorb = vNext)
    451451  {
    452452    IORBH *pIorb = Far16ToFlat(vIorb);
Note: See TracChangeset for help on using the changeset viewer.