apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdono...@apache.org
Subject svn commit: r669063 - /apr/apr-util/branches/1.3.x/dbd/apr_dbd_odbc.c
Date Wed, 18 Jun 2008 02:46:33 GMT
Author: tdonovan
Date: Tue Jun 17 19:46:33 2008
New Revision: 669063

URL: http://svn.apache.org/viewvc?rev=669063&view=rev
Log:
make test for NULL or error (-1) value pointer safe for 64-bit - from trunk r669062

Modified:
    apr/apr-util/branches/1.3.x/dbd/apr_dbd_odbc.c

Modified: apr/apr-util/branches/1.3.x/dbd/apr_dbd_odbc.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/dbd/apr_dbd_odbc.c?rev=669063&r1=669062&r2=669063&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/dbd/apr_dbd_odbc.c (original)
+++ apr/apr-util/branches/1.3.x/dbd/apr_dbd_odbc.c Tue Jun 17 19:46:33 2008
@@ -1311,10 +1311,11 @@
 
     p = odbc_get(row, col, SQL_C_CHAR);
 
-    if ((signed int) p > 0)
-        return apr_pstrdup(row->pool, p);   /* row pool lifetime */
+    /* NULL or invalid (-1) */
+    if (p == NULL || p == (void *) -1)
+        return p;     
     else
-        return p;     /* NULL or invalid (-1) */
+        return apr_pstrdup(row->pool, p);   
 }
 
 /** error: get current error message (if any) **/



Mime
View raw message