httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/filters mod_include.c
Date Wed, 27 Aug 2003 23:09:51 GMT
nd          2003/08/27 16:09:51

  Modified:    modules/filters mod_include.c
  Log:
  the extra buffer variable is no longer needed.
  
  Revision  Changes    Path
  1.280     +22 -30    httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.279
  retrieving revision 1.280
  diff -u -r1.279 -r1.280
  --- mod_include.c	27 Aug 2003 21:36:03 -0000	1.279
  +++ mod_include.c	27 Aug 2003 23:09:51 -0000	1.280
  @@ -1158,7 +1158,7 @@
   {
       parse_node_t *new, *root = NULL, *current = NULL;
       request_rec *r = ctx->intern->r;
  -    const char *buffer, *error = "Invalid expression \"%s\" in file %s";
  +    const char *error = "Invalid expression \"%s\" in file %s";
       const char *parse = expr;
       int was_unmatched = 0;
       unsigned regex = 0;
  @@ -1352,10 +1352,9 @@
       while (current) {
           switch (current->token.type) {
           case TOKEN_STRING:
  -            buffer = ap_ssi_parse_string(ctx, current->token.value, NULL, 0,
  -                                         SSI_EXPAND_DROP_NAME);
  -
  -            current->token.value = buffer;
  +            current->token.value =
  +                ap_ssi_parse_string(ctx, current->token.value, NULL, 0,
  +                                    SSI_EXPAND_DROP_NAME);
               current->value = !!*current->token.value;
               break;
   
  @@ -1372,11 +1371,9 @@
               if (!current->right->done) {
                   switch (current->right->token.type) {
                   case TOKEN_STRING:
  -                    buffer = ap_ssi_parse_string(ctx,
  -                                                 current->right->token.value,
  -                                                 NULL, 0, SSI_EXPAND_DROP_NAME);
  -
  -                    current->right->token.value = buffer;
  +                    current->right->token.value =
  +                        ap_ssi_parse_string(ctx, current->right->token.value,
  +                                            NULL, 0, SSI_EXPAND_DROP_NAME);
                       current->right->value = !!*current->right->token.value;
                       DEBUG_DUMP_EVAL(ctx, current->right);
                       current->right->done = 1;
  @@ -1398,12 +1395,9 @@
                   if (!current->left->done) {
                       switch (current->left->token.type) {
                       case TOKEN_STRING:
  -                        buffer = ap_ssi_parse_string(ctx,
  -                                                     current->left->token.value,
  -                                                     NULL, 0,
  -                                                     SSI_EXPAND_DROP_NAME);
  -
  -                        current->left->token.value = buffer;
  +                        current->left->token.value =
  +                            ap_ssi_parse_string(ctx, current->left->token.value,
  +                                                NULL, 0, SSI_EXPAND_DROP_NAME);
                           current->left->value = !!*current->left->token.value;
                           DEBUG_DUMP_EVAL(ctx, current->left);
                           current->left->done = 1;
  @@ -1438,14 +1432,12 @@
                   *was_error = 1;
                   return 0;
               }
  -            buffer = ap_ssi_parse_string(ctx, current->left->token.value,
  -                                         NULL, 0, SSI_EXPAND_DROP_NAME);
  -
  -            current->left->token.value = buffer;
  -            buffer = ap_ssi_parse_string(ctx, current->right->token.value,
  -                                         NULL, 0, SSI_EXPAND_DROP_NAME);
  -
  -            current->right->token.value = buffer;
  +            current->left->token.value =
  +                ap_ssi_parse_string(ctx, current->left->token.value, NULL, 0,
  +                                    SSI_EXPAND_DROP_NAME);
  +            current->right->token.value =
  +                ap_ssi_parse_string(ctx, current->right->token.value, NULL, 0,
  +                                    SSI_EXPAND_DROP_NAME);
   
               if (current->right->token.type == TOKEN_RE) {
                   current->value = re_check(ctx, current->left->token.value,
  @@ -1475,13 +1467,13 @@
                   *was_error = 1;
                   return 0;
               }
  -            buffer = ap_ssi_parse_string(ctx, current->left->token.value, NULL,
  -                                         0, SSI_EXPAND_DROP_NAME);
   
  -            current->left->token.value = buffer;
  -            buffer = ap_ssi_parse_string(ctx, current->right->token.value, NULL,
  -                                         0, SSI_EXPAND_DROP_NAME);
  -            current->right->token.value = buffer;
  +            current->left->token.value =
  +                ap_ssi_parse_string(ctx, current->left->token.value, NULL, 0,
  +                                    SSI_EXPAND_DROP_NAME);
  +            current->right->token.value =
  +                ap_ssi_parse_string(ctx, current->right->token.value, NULL, 0,
  +                                    SSI_EXPAND_DROP_NAME);
   
               current->value = strcmp(current->left->token.value,
                                       current->right->token.value);
  
  
  

Mime
View raw message