]> granicus.if.org Git - apache/commitdiff
Save a few bytes in conf pool and axe a function that duplicates 'ap_set_string_slot'
authorChristophe Jaillet <jailletc36@apache.org>
Sun, 24 May 2015 12:32:22 +0000 (12:32 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sun, 24 May 2015 12:32:22 +0000 (12:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1681440 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authn_dbm.c

index d969c7c63a4fa319265e4afa3f3ed9d1bebfde35..0df9b6dc48024318b4de5a775efc572e2d063940 100644 (file)
@@ -58,23 +58,13 @@ static void *create_authn_dbm_dir_config(apr_pool_t *p, char *d)
     return conf;
 }
 
-static const char *set_dbm_type(cmd_parms *cmd,
-                                void *dir_config,
-                                const char *arg)
-{
-    authn_dbm_config_rec *conf = dir_config;
-
-    conf->dbmtype = apr_pstrdup(cmd->pool, arg);
-    return NULL;
-}
-
 static const command_rec authn_dbm_cmds[] =
 {
     AP_INIT_TAKE1("AuthDBMUserFile", ap_set_file_slot,
      (void *)APR_OFFSETOF(authn_dbm_config_rec, pwfile),
      OR_AUTHCFG, "dbm database file containing user IDs and passwords"),
-    AP_INIT_TAKE1("AuthDBMType", set_dbm_type,
-     NULL,
+    AP_INIT_TAKE1("AuthDBMType", ap_set_string_slot,
+     (void *)APR_OFFSETOF(authn_dbm_config_rec, dbmtype),
      OR_AUTHCFG, "what type of DBM file the user file is"),
     {NULL}
 };