apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r587430 - /apr/apr-util/trunk/strmatch/apr_strmatch.c
Date Tue, 23 Oct 2007 09:48:09 GMT
Author: wrowe
Date: Tue Oct 23 02:48:04 2007
New Revision: 587430

URL: http://svn.apache.org/viewvc?rev=587430&view=rev
Log:
Correctly use size_t aligned numerics (which with all
of the casts gets especially tricky).

Modified:
    apr/apr-util/trunk/strmatch/apr_strmatch.c

Modified: apr/apr-util/trunk/strmatch/apr_strmatch.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/strmatch/apr_strmatch.c?rev=587430&r1=587429&r2=587430&view=diff
==============================================================================
--- apr/apr-util/trunk/strmatch/apr_strmatch.c (original)
+++ apr/apr-util/trunk/strmatch/apr_strmatch.c Tue Oct 23 02:48:04 2007
@@ -36,7 +36,7 @@
                                const char *s, apr_size_t slen)
 {
     const char *s_end = s + slen;
-    int *shift = (int *)(this_pattern->context);
+    apr_size_t *shift = (apr_size_t *)(this_pattern->context);
     const char *s_next = s + this_pattern->length - 1;
     const char *p_start = this_pattern->pattern;
     const char *p_end = p_start + this_pattern->length - 1;
@@ -60,7 +60,7 @@
                                const char *s, apr_size_t slen)
 {
     const char *s_end = s + slen;
-    int *shift = (int *)(this_pattern->context);
+    apr_size_t *shift = (apr_size_t *)(this_pattern->context);
     const char *s_next = s + this_pattern->length - 1;
     const char *p_start = this_pattern->pattern;
     const char *p_end = p_start + this_pattern->length - 1;
@@ -85,7 +85,7 @@
 {
     apr_strmatch_pattern *pattern;
     apr_size_t i;
-    int *shift;
+    apr_size_t *shift;
 
     pattern = apr_palloc(p, sizeof(*pattern));
     pattern->pattern = s;
@@ -96,7 +96,7 @@
         return pattern;
     }
 
-    shift = (int *)apr_palloc(p, sizeof(int) * NUM_CHARS);
+    shift = (apr_size_t *)apr_palloc(p, sizeof(apr_size_t) * NUM_CHARS);
     for (i = 0; i < NUM_CHARS; i++) {
         shift[i] = pattern->length;
     }



Mime
View raw message