MINOR: map: get rid of map_add_key_value()

This function was only used once in cli_parse_add_map(), and half of the
work it used to do was already known from the caller or testable outside
of the lock. Given that we'll need to modify it soon to pass a generation
number, let's remerge it in the caller instead, using pat_ref_load() which
is the one we'll need.
diff --git a/src/map.c b/src/map.c
index 75356ab..490f8bb 100644
--- a/src/map.c
+++ b/src/map.c
@@ -744,20 +744,6 @@
 	return 1;
 }
 
-static int map_add_key_value(struct appctx *appctx, const char *key, const char *value, char **err)
-{
-	int ret;
-
-	HA_SPIN_LOCK(PATREF_LOCK, &appctx->ctx.map.ref->lock);
-	if (appctx->ctx.map.display_flags == PAT_REF_MAP)
-		ret = pat_ref_add(appctx->ctx.map.ref, key, value, err);
-	else
-		ret = pat_ref_add(appctx->ctx.map.ref, key, NULL, err);
-	HA_SPIN_UNLOCK(PATREF_LOCK, &appctx->ctx.map.ref->lock);
-
-	return ret;
-}
-
 static int cli_parse_add_map(char **args, char *payload, struct appctx *appctx, void *private)
 {
 	if (strcmp(args[1], "map") == 0 ||
@@ -842,7 +828,13 @@
 				value[l] = 0;
 			}
 
+			if (appctx->ctx.map.display_flags != PAT_REF_MAP)
+				value = NULL;
+
+			HA_SPIN_LOCK(PATREF_LOCK, &appctx->ctx.map.ref->lock);
+			ret = !!pat_ref_load(appctx->ctx.map.ref, appctx->ctx.map.ref->curr_gen, key, value, -1, &err);
+			HA_SPIN_UNLOCK(PATREF_LOCK, &appctx->ctx.map.ref->lock);
+
-			ret = map_add_key_value(appctx, key, value, &err);
 			if (!ret) {
 				if (err)
 					return cli_dynerr(appctx, memprintf(&err, "%s.\n", err));