You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2013/08/13 15:16:14 UTC

svn commit: r1513472 - /subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c

Author: philip
Date: Tue Aug 13 13:16:14 2013
New Revision: 1513472

URL: http://svn.apache.org/r1513472
Log:
Avoid repeating a string literal.

* subversion/mod_dav_svn/mod_dav_svn.c
  (NO_MAP_TO_STORAGE_NOTE): New macro.
  (dav_svn__translate_name, dav_svn__map_to_storage): Use macro.

Modified:
    subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c

Modified: subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c?rev=1513472&r1=1513471&r2=1513472&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/mod_dav_svn.c Tue Aug 13 13:16:14 2013
@@ -1092,6 +1092,8 @@ static int dav_svn__handler(request_rec 
   return DECLINED;
 }
 
+#define NO_MAP_TO_STORAGE_NOTE "dav_svn-no-map-to-storage"
+
 /* Prevent filename on the request from being set since we aren't serving a
  * file off the disk.  This means that <Directory> blocks will not match and
  * that * %f in logging formats will show as "-". */
@@ -1109,7 +1111,7 @@ static int dav_svn__translate_name(reque
 
   /* Leave a note to ourselves so that we know not to decline in the 
    * map_to_storage hook. */
-  apr_table_setn(r->notes, "dav_svn-no-map-to-storage", (const char*)1); 
+  apr_table_setn(r->notes, NO_MAP_TO_STORAGE_NOTE, (const char*)1); 
   return OK;
 }
 
@@ -1120,7 +1122,7 @@ static int dav_svn__map_to_storage(reque
 {
   /* Check a note we left in translate_name since map_to_storage doesn't
    * have access to our configuration. */
-  if (apr_table_get(r->notes, "dav_svn-no-map-to-storage"))
+  if (apr_table_get(r->notes, NO_MAP_TO_STORAGE_NOTE))
     return OK;
 
   return DECLINED;