apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test testfileinfo.c
Date Sat, 23 Nov 2002 22:33:12 GMT
jorton      2002/11/23 14:33:12

  Modified:    test     testfileinfo.c
  Log:
  Remove redundant pallocs, and mark local funcs/vars as static.
  
  Revision  Changes    Path
  1.4       +4 -4      apr/test/testfileinfo.c
  
  Index: testfileinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfileinfo.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- testfileinfo.c	23 Nov 2002 19:44:15 -0000	1.3
  +++ testfileinfo.c	23 Nov 2002 22:33:12 -0000	1.4
  @@ -63,7 +63,7 @@
   
   #define FILENAME "data/file_datafile.txt"
   
  -struct view_fileinfo
  +static const struct view_fileinfo
   {
       apr_int32_t bits;
       char *description;
  @@ -84,7 +84,7 @@
       {0,                NULL}
   }; 
   
  -int finfo_equal(apr_finfo_t f1, apr_finfo_t f2)
  +static int finfo_equal(apr_finfo_t f1, apr_finfo_t f2)
   {
       return (f1.valid == f2.valid &&
               f1.protection == f2.protection &&
  @@ -120,7 +120,7 @@
   
       rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
       if (rv  == APR_INCOMPLETE) {
  -        char *str =  apr_palloc(p, 256);
  +        char *str;
   	int i;
           str = apr_pstrdup(p, "APR_INCOMPLETE:  Missing ");
           for (i = 0; vfi[i].bits; ++i) {
  @@ -141,7 +141,7 @@
   
       rv = apr_stat(&finfo, FILENAME, APR_FINFO_NORM, p);
       if (rv  == APR_INCOMPLETE) {
  -        char *str =  apr_palloc(p, 256);
  +        char *str;
   	int i;
           str = apr_pstrdup(p, "APR_INCOMPLETE:  Missing ");
           for (i = 0; vfi[i].bits; ++i) {
  
  
  

Mime
View raw message