Add assertions in various places to ensure tal_fmt doesn't receive NULL as argument for strings.

This commit is contained in:
Corné Plooy
2018-03-01 11:32:38 +01:00
committed by Christian Decker
parent aba3d5f34d
commit b857b2e843
11 changed files with 39 additions and 0 deletions

View File

@@ -53,6 +53,9 @@ const char *tmpctx_any(void)
struct tmpctx *t = list_top(&tmpctxs, struct tmpctx, list);
if (t)
{
assert(t->file != NULL);
return tal_fmt(t, "%s:%u", t->file, t->line);
}
return NULL;
}