-/* $Id: main.c,v 1.40 2018/07/30 09:56:50 benno Exp $ */
+/* $Id: main.c,v 1.41 2018/07/30 09:59:03 benno Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
*
/* XXX replace with existance check in parse.y */
err(EXIT_FAILURE, "no account key in config?");
}
- if (domain->challengedir == NULL)
- chngdir = strdup(WWW_DIR);
- else
- chngdir = domain->challengedir;
- if (chngdir == NULL)
- err(EXIT_FAILURE, "strdup");
+ if ((chngdir = domain->challengedir) == NULL)
+ if ((chngdir = strdup(WWW_DIR)) == NULL)
+ err(EXIT_FAILURE, "strdup");
/*
* Do some quick checks to see if our paths exist.