apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r587439 - in /apr/apr-util/trunk: dbm/apr_dbm_sdbm.c dbm/sdbm/sdbm_pair.c include/apr_sdbm.h
Date Tue, 23 Oct 2007 09:59:33 GMT
Author: wrowe
Date: Tue Oct 23 02:59:32 2007
New Revision: 587439

URL: http://svn.apache.org/viewvc?rev=587439&view=rev
Log:
size'edness issues in sdbm, which is limited to int's
(and in one case, manipulates an array of short's)

Modified:
    apr/apr-util/trunk/dbm/apr_dbm_sdbm.c
    apr/apr-util/trunk/dbm/sdbm/sdbm_pair.c
    apr/apr-util/trunk/include/apr_sdbm.h

Modified: apr/apr-util/trunk/dbm/apr_dbm_sdbm.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbm/apr_dbm_sdbm.c?rev=587439&r1=587438&r2=587439&view=diff
==============================================================================
--- apr/apr-util/trunk/dbm/apr_dbm_sdbm.c (original)
+++ apr/apr-util/trunk/dbm/apr_dbm_sdbm.c Tue Oct 23 02:59:32 2007
@@ -107,7 +107,7 @@
     apr_sdbm_datum_t kd, rd;
 
     kd.dptr = key.dptr;
-    kd.dsize = key.dsize;
+    kd.dsize = (int)key.dsize;
 
     rv = apr_sdbm_fetch(dbm->file, &rd, kd);
 
@@ -126,10 +126,10 @@
     apr_sdbm_datum_t kd, vd;
 
     kd.dptr = key.dptr;
-    kd.dsize = key.dsize;
+    kd.dsize = (int)key.dsize;
 
     vd.dptr = value.dptr;
-    vd.dsize = value.dsize;
+    vd.dsize = (int)value.dsize;
 
     rv = apr_sdbm_store(dbm->file, kd, vd, APR_SDBM_REPLACE);
 
@@ -143,7 +143,7 @@
     apr_sdbm_datum_t kd;
 
     kd.dptr = key.dptr;
-    kd.dsize = key.dsize;
+    kd.dsize = (int)key.dsize;
 
     rv = apr_sdbm_delete(dbm->file, kd);
 
@@ -157,7 +157,7 @@
     apr_sdbm_datum_t vd, kd;
 
     kd.dptr = key.dptr;
-    kd.dsize = key.dsize;
+    kd.dsize = (int)key.dsize;
 
     if (apr_sdbm_fetch(dbm->file, &vd, kd) != APR_SUCCESS)
         exists = 0;

Modified: apr/apr-util/trunk/dbm/sdbm/sdbm_pair.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbm/sdbm/sdbm_pair.c?rev=587439&r1=587438&r2=587439&view=diff
==============================================================================
--- apr/apr-util/trunk/dbm/sdbm/sdbm_pair.c (original)
+++ apr/apr-util/trunk/dbm/sdbm/sdbm_pair.c Tue Oct 23 02:59:32 2007
@@ -183,7 +183,7 @@
 		register int m;
 		register char *dst = pag + (i == 1 ? PBLKSIZ : ino[i - 1]);
 		register char *src = pag + ino[i + 1];
-		register int   zoo = dst - src;
+		register short zoo = (short) (dst - src);
 
 		debug(("free-up %d ", zoo));
 /*

Modified: apr/apr-util/trunk/include/apr_sdbm.h
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/include/apr_sdbm.h?rev=587439&r1=587438&r2=587439&view=diff
==============================================================================
--- apr/apr-util/trunk/include/apr_sdbm.h (original)
+++ apr/apr-util/trunk/include/apr_sdbm.h Tue Oct 23 02:59:32 2007
@@ -50,6 +50,7 @@
     /** pointer to the data stored/retrieved */
     char *dptr;
     /** size of data */
+    /* apr_ssize_t for release 2.0??? */
     int dsize;
 } apr_sdbm_datum_t;
 



Mime
View raw message