• Rusty Russell's avatar
    tdb2: clean up logging · 4e185ad8
    Rusty Russell authored
    Logged errors should always set tdb->ecode before they are called, and
    there's little reason to have a sprintf-style logging function since
    we can do the formatting internally.
    
    Change the tdb_log attribute to just take a "const char *", and create
    a new tdb_logerr() helper which sets ecode and calls it.  As a bonus,
    mark it COLD so the compiler can optimize appropriately knowing that
    it's unlikely to be invoked.
    4e185ad8
tdb.c 17.3 KB