tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r559692 - in /tomcat/connectors/trunk/jk/native/common: jk_logger.h jk_util.c
Date Thu, 26 Jul 2007 05:01:32 GMT
Author: mturk
Date: Wed Jul 25 22:01:31 2007
New Revision: 559692

URL: http://svn.apache.org/viewvc?view=rev&rev=559692
Log:
Use size_t for pointer and string based operations

Modified:
    tomcat/connectors/trunk/jk/native/common/jk_logger.h
    tomcat/connectors/trunk/jk/native/common/jk_util.c

Modified: tomcat/connectors/trunk/jk/native/common/jk_logger.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_logger.h?view=diff&rev=559692&r1=559691&r2=559692
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_logger.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_logger.h Wed Jul 25 22:01:31 2007
@@ -39,9 +39,9 @@
     const char *log_fmt;        /* the configured timestamp format for logging */
     const char *log_fmt_subsec; /* like log_fmt, but milli/micro seconds
                                    marker replaced, because strftime() doesn't handle those
*/
-    int log_fmt_offset;         /* at which position should we insert */
-    int log_fmt_type;           /* do we want milli or microseconds */
-    int log_fmt_size;           /* how long is this format string */
+    int    log_fmt_type;        /* do we want milli or microseconds */
+    size_t log_fmt_offset;      /* at which position should we insert */
+    size_t log_fmt_size;        /* how long is this format string */
 
     int (JK_METHOD * log) (jk_logger_t *l, int level, int used, char *what);
 

Modified: tomcat/connectors/trunk/jk/native/common/jk_util.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_util.c?view=diff&rev=559692&r1=559691&r2=559692
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_util.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_util.c Wed Jul 25 22:01:31 2007
@@ -374,8 +374,8 @@
         if ( fmt ) {
             strncpy(log_fmt_safe, jk_log_fmt, JK_TIME_MAX_SIZE);
             if ( (s = strstr(log_fmt_safe, JK_TIME_CONV_MILLI)) ) {
-                int offset = s - log_fmt_safe;
-                int len = strlen(JK_TIME_PATTERN_MILLI);
+                size_t offset = s - log_fmt_safe;
+                size_t len = strlen(JK_TIME_PATTERN_MILLI);
 
                 l->log_fmt_type = JK_TIME_SUBSEC_MILLI;
                 l->log_fmt_offset = offset;
@@ -388,9 +388,9 @@
                 l->log_fmt_subsec = fmt;
                 l->log_fmt_size = strlen(fmt);
             }
-            else if ( (s = strstr(log_fmt_safe, JK_TIME_CONV_MICRO)) ) {
-                int offset = s - log_fmt_safe;
-                int len = strlen(JK_TIME_PATTERN_MICRO);
+            else if ((s = strstr(log_fmt_safe, JK_TIME_CONV_MICRO))) {
+                size_t offset = s - log_fmt_safe;
+                size_t len = strlen(JK_TIME_PATTERN_MICRO);
 
                 l->log_fmt_type = JK_TIME_SUBSEC_MICRO;
                 l->log_fmt_offset = offset;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message