ldb:ldb_controls.c - remove duplicate definition of "LDB_CONTROL_CMP"
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Wed, 22 Jun 2011 12:48:33 +0000 (14:48 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 11 Sep 2011 15:33:08 +0000 (17:33 +0200)
And fix the comment

Reviewed-by: Jelmer
lib/ldb/common/ldb_controls.c

index 81f3c7a5b1fb51df16b55450c608fccc4bfe2bad..3856167835c7f83d5cf073af0bcbe0a9516d12f2 100644 (file)
@@ -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)
 {