From 9012a501533126c4c0ac25a16fd6439a45df3d9a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 4 Dec 2004 10:14:03 +0000 Subject: r4059: moved the ldb -o option parsing to a common routine (This used to be commit ee52c1e38c9bac852458196ffbd677cca62a3965) --- source4/lib/ldb/tools/ldbedit.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'source4/lib/ldb/tools/ldbedit.c') diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c index fd45248c0e..f84d05440f 100644 --- a/source4/lib/ldb/tools/ldbedit.c +++ b/source4/lib/ldb/tools/ldbedit.c @@ -34,6 +34,7 @@ #include "includes.h" #include "ldb/include/ldb.h" +#include "ldb/include/ldb_private.h" static int verbose; @@ -358,18 +359,7 @@ static void usage(void) break; case 'o': - ldbopts++; - if (options == NULL) { - options = (const char **)malloc(sizeof(char *) * (ldbopts + 1)); - } else { - options = (const char **)realloc(options, sizeof(char *) * (ldbopts + 1)); - if (options == NULL) { - fprintf(stderr, "Out of memory!\n"); - exit(-1); - } - } - options[ldbopts - 1] = optarg; - options[ldbopts] = NULL; + options = ldb_options_parse(options, &ldbopts, optarg); break; case 'h': -- cgit