Skip to content
  • Michal Privoznik's avatar
    lib: Use g_clear_pointer() more · 87a43a90
    Michal Privoznik authored
    
    
    This change was generated using the following spatch:
    
      @ rule1 @
      expression a;
      identifier f;
      @@
        <...
      - f(*a);
        ... when != a;
      - *a = NULL;
      + g_clear_pointer(a, f);
        ...>
    
      @ rule2 @
      expression a;
      identifier f;
      @@
        <...
      - f(a);
        ... when != a;
      - a = NULL;
      + g_clear_pointer(&a, f);
        ...>
    
    Then, I left some of the changes out, like tools/nss/ (which
    doesn't link with glib) and put back a comment in
    qemuBlockJobProcessEventCompletedActiveCommit() which coccinelle
    decided to remove (I have no idea why).
    
    Signed-off-by: default avatarMichal Privoznik <mprivozn@redhat.com>
    Reviewed-by: default avatarJán Tomko <jtomko@redhat.com>
    87a43a90