apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r657530 - /apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
Date Sun, 18 May 2008 10:24:56 GMT
Author: bojan
Date: Sun May 18 03:24:55 2008
New Revision: 657530

URL: http://svn.apache.org/viewvc?rev=657530&view=rev
Log:
Do not move if rownum is not greater than zero.

Modified:
    apr/apr-util/trunk/dbd/apr_dbd_pgsql.c

Modified: apr/apr-util/trunk/dbd/apr_dbd_pgsql.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_pgsql.c?rev=657530&r1=657529&r2=657530&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_pgsql.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_pgsql.c Sun May 18 03:24:55 2008
@@ -231,14 +231,14 @@
         row = apr_palloc(pool, sizeof(apr_dbd_row_t));
         *rowp = row;
         row->res = res;
-        row->n = sequential ? 0 : --rownum;
+        row->n = sequential ? 0 : (rownum > 0 ? --rownum : row->n);
     }
     else {
         if ( sequential ) {
             ++row->n;
         }
         else {
-            row->n = --rownum;
+            row->n = (rownum > 0 ? --rownum : row->n);
         }
     }
 



Mime
View raw message