s4-ldb: Write more explanatory comment for ldb_msg_add()
authorKamen Mazdrashki <kamenim@samba.org>
Fri, 16 Jul 2010 10:41:57 +0000 (13:41 +0300)
committerKamen Mazdrashki <kamenim@samba.org>
Fri, 16 Jul 2010 11:29:10 +0000 (14:29 +0300)
source4/lib/ldb/common/ldb_msg.c

index 9f96ae6cbfd8509d16d2f71b408a5e418be6735f..ca7b9619538a137105621987eb70826515b065e9 100644 (file)
@@ -150,9 +150,14 @@ int ldb_msg_add_empty(     struct ldb_message *msg,
        return LDB_SUCCESS;
 }
 
-/*
-  add an empty element to a message
-*/
+/**
+ * Adds an element to a message.
+ *
+ * NOTE: Ownership of ldb_message_element fields
+ *       is NOT transferred. Thus, if *el pointer
+ *       is invalidated for some reason, this will
+ *       corrupt *msg contents also
+ */
 int ldb_msg_add(struct ldb_message *msg, 
                const struct ldb_message_element *el, 
                int flags)