Commit 497beda3 authored by Mark Andrews's avatar Mark Andrews
Browse files

adjust builtin syntax checks [RT#15268]

parent 4e1d3e67
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: builtin.c,v 1.8 2005/08/18 00:57:26 marka Exp $ */
/* $Id: builtin.c,v 1.9 2005/08/23 03:01:14 marka Exp $ */
/*! \file
* \brief
......@@ -214,11 +214,15 @@ static isc_result_t
builtin_create(const char *zone, int argc, char **argv,
void *driverdata, void **dbdata)
{
REQUIRE(argc >= 1);
UNUSED(zone);
UNUSED(driverdata);
if ((argc != 1 && strcmp(argv[0], "empty") != 0) ||
argc != 3)
if (strcmp(argv[0], "empty") == 0) {
if (argc != 3)
return (DNS_R_SYNTAX);
} else if (argc != 1)
return (DNS_R_SYNTAX);
if (strcmp(argv[0], "version") == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment