Skip to content
  • Paolo Bonzini's avatar
    dma: the passed io_func does not return NULL · 6bee44ea
    Paolo Bonzini authored
    
    
    Initially found with the following semantic patch:
    
    @ type @
    BlockDriverAIOCB *x;
    expression E;
    @@
      x = E;
    - if (x == NULL) { ... }
    
    @ acb1 @
    expression E, E1;
    @@
      E1->acb = E;
    - if (E1->acb == NULL) { ... }
    
    @ aiocb1 @
    expression E, E1;
    @@
      E1->aiocb = E;
    - if (E1->aiocb == NULL) { ... }
    
    @ acb @
    expression E, E1;
    @@
      E1.acb = E;
    - if (E1.acb == NULL) { ... }
    
    @ aiocb @
    expression E, E1;
    @@
      E1.aiocb = E;
    - if (E1.aiocb == NULL) { ... }
    
    but changed manually to include an assert.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    6bee44ea