Skip to content
Snippets Groups Projects
  • Matthias Schiffer's avatar
    72c71d35
    gluon-mesh-babel: clean up link-local address handling · 72c71d35
    Matthias Schiffer authored
    - Rename obtain_if_addr() to get_linklocal_address()
    - Pass buffer of size INET6_ADDRSTRLEN instead of the oversized NI_MAXHOST
    - Check if an address is link-local before converting to a string
    - Replace an incorrect use of strncmp() with strcmp()
    - Return status to caller
    - Streamline control flow
    
    While we're at it, the function handle_neighbour(), which is one of the
    callers of get_linklocal_address() is slightly cleaned up as well.
    gluon-mesh-babel: clean up link-local address handling
    Matthias Schiffer authored
    - Rename obtain_if_addr() to get_linklocal_address()
    - Pass buffer of size INET6_ADDRSTRLEN instead of the oversized NI_MAXHOST
    - Check if an address is link-local before converting to a string
    - Replace an incorrect use of strncmp() with strcmp()
    - Return status to caller
    - Streamline control flow
    
    While we're at it, the function handle_neighbour(), which is one of the
    callers of get_linklocal_address() is slightly cleaned up as well.