From 80f6932e3ef4cfc25b6ed717ba2f499314ec5226 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Wed, 22 Jun 2011 14:48:33 +0200 Subject: [PATCH] ldb:ldb_controls.c - remove duplicate definition of "LDB_CONTROL_CMP" And fix the comment Reviewed-by: Jelmer --- lib/ldb/common/ldb_controls.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/ldb/common/ldb_controls.c b/lib/ldb/common/ldb_controls.c index 81f3c7a5b1f..3856167835c 100644 --- a/lib/ldb/common/ldb_controls.c +++ b/lib/ldb/common/ldb_controls.c @@ -389,9 +389,9 @@ char *ldb_control_to_string(TALLOC_CTX *mem_ctx, const struct ldb_control *contr /* * A little trick to allow to use constants defined in headers rather than - * hardwritten in the file hardwritten in the file - * sizeof will return the \0 char as well so it will take the place of ":" in the - * length of the string + * hardwritten in the file. + * "sizeof" will return the \0 char as well so it will take the place of ":" + * in the length of the string. */ #define LDB_CONTROL_CMP(control, NAME) strncmp(control, NAME ":", sizeof(NAME)) @@ -1000,14 +1000,6 @@ struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLO return NULL; } -/* - * A little trick to allow to use constants defined in headers rather than - * hardwritten in the file hardwritten in the file - * sizeof will return the \0 char as well so it will take the place of ":" in the - * length of the string - */ -#define LDB_CONTROL_CMP(control, NAME) strncmp(control, NAME ":", sizeof(NAME)) - /* Parse controls from the format used on the command line and in ejs */ struct ldb_control **ldb_parse_control_strings(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char **control_strings) { -- 2.34.1