common: Avoid warning about const char ** assignment.
authorWerner Koch <wk@gnupg.org>
Sun, 18 Oct 2015 17:37:41 +0000 (19:37 +0200)
committerWerner Koch <wk@gnupg.org>
Sun, 18 Oct 2015 18:08:37 +0000 (20:08 +0200)
commite64c805b0c270d859ddf2c35d573110cf25e8d48
tree35abc3875ed85b0afdfd8b0ce53b80775c9580b1
parent5aa1b392b1bf6fcf4cd380862c5affac39a4f34d
common: Avoid warning about const char ** assignment.

* common/mkdir_p.c (gnupg_amkdir_p): Also strdup first item.  Return
an error on malloc failure.
(gnupg_mkdir_p): Fix type of dirs and tmp_dirs.
--

The code was correct but it inhibits type checking.  Instead of
casting it seems easier to simply allocate also the the first item in
DIRS.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/mkdir_p.c