Skip to content
  • Thomas Haller's avatar
    auth-chain: don't copy ChainData tag · 5a3ffffe
    Thomas Haller authored
    All callers pass a C string literal as the user-data tag of NMAuthChain.
    It makes little sense otherwise because you usually know which user data
    you need in advance.
    
    So don't bother with copying the string. Just reference the defacto
    static string.
    
    Rename nm_auth_chain_set_data() to nm_auth_chain_set_data_unsafe() to indicate
    that the lifetime of the tag string is now the caller's responsibility.
    
    The nm_auth_chain_set_data() macro now ensures that the tag argument is
    a C string literal. In fact, all callers that we had did that already.
    5a3ffffe