]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
renamed `cfg_map_addclone()` into `cfg_map_add()` 12052/head
authorColin Vidal <colin@isc.org>
Thu, 21 May 2026 07:53:59 +0000 (09:53 +0200)
committerColin Vidal <colin@isc.org>
Thu, 21 May 2026 14:04:01 +0000 (16:04 +0200)
Since there is no `cfg_map_add()` anymore, and `cfg_map_addclone()`
wasn't quite clear, let's rename to `cfg_map_addclone()` into
`cfg_map_add()`, as this is fundamentally what this function is doing.

lib/isccfg/include/isccfg/cfg.h
lib/isccfg/namedconf.c
lib/isccfg/parser.c

index 592f538cd008a99b640ecde65e1601bd8f41b61f..73c7a926ebb46b089f0af259b4672c3b7264b0c4 100644 (file)
@@ -136,10 +136,10 @@ cfg_parser_currentfile(cfg_parser_t *pctx);
  */
 
 isc_result_t
-cfg_map_addclone(cfg_obj_t *map, const cfg_obj_t *obj,
-                const cfg_clausedef_t *clause);
+cfg_map_add(cfg_obj_t *map, const cfg_obj_t *obj,
+           const cfg_clausedef_t *clause);
 /*%<
- * Add a clone of 'obj' to the specified clause in mapbody 'mapobj'.
+ * Clone 'obj' and add its clone to the specified clause in mapbody 'mapobj'.
  * If the clause is tagged with CFG_CLAUSEFLAG_MULTI, the function expects
  * that 'obj' is a list and will clone each element and sequentially add them
  * (preserving the order), instead of adding a list as single element of
index fbccca2643d9f9bd50782ab5639fbfc1e8d1fc93..ea3b18aae6731af28bf429521ed766527c6472f8 100644 (file)
@@ -1176,8 +1176,8 @@ map_merge(const cfg_obj_t *config ISC_ATTR_UNUSED, cfg_obj_t *effectivemap,
                if (effectiveres == ISC_R_NOTFOUND &&
                    defaultres == ISC_R_SUCCESS)
                {
-                       INSIST(cfg_map_addclone(effectivemap, defaultobj,
-                                               clause) == ISC_R_SUCCESS);
+                       INSIST(cfg_map_add(effectivemap, defaultobj, clause) ==
+                              ISC_R_SUCCESS);
                        continue;
                }
 
@@ -1205,7 +1205,7 @@ cloneto(cfg_obj_t *options, const cfg_obj_t *obj, const char *clausename) {
        const cfg_clausedef_t *clause = cfg_map_findclause(options->type,
                                                           clausename);
 
-       result = cfg_map_addclone(options, obj, clause);
+       result = cfg_map_add(options, obj, clause);
        INSIST(result == ISC_R_SUCCESS);
 }
 
index 80ceeadb81357072cfdd11f4486b9d47b5612d84..854f0b9f95a14ec4d0f1355f36bef200b637a005 100644 (file)
@@ -4047,8 +4047,8 @@ map_define(cfg_obj_t *mapobj, cfg_obj_t *obj, const cfg_clausedef_t *clause) {
 }
 
 isc_result_t
-cfg_map_addclone(cfg_obj_t *map, const cfg_obj_t *obj,
-                const cfg_clausedef_t *clause) {
+cfg_map_add(cfg_obj_t *map, const cfg_obj_t *obj,
+           const cfg_clausedef_t *clause) {
        isc_result_t result = ISC_R_SUCCESS;
        cfg_obj_t *clone = NULL;