opt: Don't segfault if a string's default is NULL
authorDouglas Bagnall <douglas@halo.gen.nz>
Fri, 20 Jun 2014 04:38:33 +0000 (16:38 +1200)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 23 Jun 2014 00:57:23 +0000 (10:27 +0930)
commit7220240c0e2fa8c9610736565e73d3c74a73466c
treef24d8bfc4a30dec5a0669800285d9d8a36371a06
parent63b0055673d2c55ff90f8b7bd8a7c5fe30f83269
opt: Don't segfault if a string's default is NULL

Instead show '(nil)', like other people do. This is distinguishable
from a similar looking string value, because the latter is shown with
double quotes while NULL's nil has no quotes.

Signed-off-by: Douglas Bagnall <douglas@halo.gen.nz>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/opt/helpers.c