@@ -97,24 +97,26 @@ static void mag_set_env_name_attr(request_rec *req, struct mag_conn *mc,
9797 }
9898}
9999
100- static char * mag_escape_display_value (request_rec * req , gss_buffer_desc disp_value )
100+ static char * mag_escape_display_value (request_rec * req ,
101+ gss_buffer_desc disp_value )
101102{
102- /* This function returns a copy (in the pool) of the given gss_buffer_t where every
103- * occurrence of " has been replaced by \". This string is NULL terminated */
103+ /* This function returns a copy (in the pool) of the given gss_buffer_t
104+ * where every occurrence of " has been replaced by \". This string is
105+ * NULL terminated */
104106 int i = 0 , j = 0 , n_quotes = 0 ;
105107 char * escaped_value = NULL ;
106108 char * value = (char * ) disp_value .value ;
107109
108- // count number of quotes in the input string
110+ /* count number of quotes in the input string */
109111 for (i = 0 , j = 0 ; i < disp_value .length ; i ++ )
110112 if (value [i ] == '"' )
111113 n_quotes ++ ;
112114
113- // if there are no quotes, just return a copy of the string
115+ /* if there are no quotes, just return a copy of the string */
114116 if (n_quotes == 0 )
115117 return apr_pstrndup (req -> pool , value , disp_value .length );
116118
117- // gss_buffer_t are not \0 terminated, but our result will be
119+ /* gss_buffer_t are not \0 terminated, but our result will be */
118120 escaped_value = apr_palloc (req -> pool , disp_value .length + n_quotes + 1 );
119121 for (i = 0 ,j = 0 ; i < disp_value .length ; i ++ , j ++ ) {
120122 if (value [i ] == '"' ) {
@@ -123,7 +125,7 @@ static char* mag_escape_display_value(request_rec *req, gss_buffer_desc disp_val
123125 }
124126 escaped_value [j ] = value [i ];
125127 }
126- // make the string NULL terminated
128+ /* make the string NULL terminated */
127129 escaped_value [j ] = '\0' ;
128130 return escaped_value ;
129131}
0 commit comments