Skip to content
  • Thomas Haller's avatar
    shared: relax assertion in nm_utils_parse_inaddr()/nm_utils_parse_inaddr_prefix() · 9ad60ad0
    Thomas Haller authored
    The assertion fails in nmtui's ip_route_transform_from_dest_string(),
    which does not initialize the address output argument to %NULL.
    
    There are three possibilities how the API could work:
    
     - assert/require the user to pass in arguments which pre-initialized
       to NULL or unset.
     - always set the output arguments, even if the function fails.
     - don't bother and leave output values untouched, if function fails.
    
    It's not clear which approach is the best. Not to bother possibliy
    leaves uninitialized values, which could be error prone. Still, do
    just that.
    
    Fixes: 0b3197a3
    9ad60ad0