Skip to content
  • Philip Withnall's avatar
    gmessages: Clear address before passing it to getpeername() · 7a1a9259
    Philip Withnall authored
    
    
    This will probably make no functional difference, but will squash a
    warning from scan-build:
    ```
    ../../../../source/glib/glib/gmessages.c:2243:42: warning: The left operand of '==' is a garbage value [core.UndefinedBinaryOperatorResult]
      if (err == 0 && addr.storage.ss_family == AF_UNIX)
                      ~~~~~~~~~~~~~~~~~~~~~~ ^
    ```
    
    It seems like a reasonable thing to warn about. Initialising the full
    union to zero should avoid any possibility of undefined behaviour like
    that.
    
    Signed-off-by: default avatarPhilip Withnall <pwithnall@endlessos.org>
    
    Helps: #1767
    7a1a9259