[Libreoffice-commits] .: connectivity/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 12 11:25:13 PDT 2012


 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx |   13 +++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 1488e24a340333d4ddc954643b9cfd56849b45a4
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Sep 12 20:21:21 2012 +0200

    connectivity: fix some "empty body" warnings on Mac
    
    Change-Id: I832b369d87da9b622759bf7ddd14f95475256c38

diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index 9c35eef..ecd333f 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -170,7 +170,10 @@ static bool isOperator( char c )
     static const char * operators = "<>=()!/&%.,;";
 
     const char * w = operators;
-    for( ; *w && *w != c ; w ++);
+    while (*w && *w != c)
+    {
+        ++w;
+    }
     return *w != 0;
 }
 
@@ -425,8 +428,12 @@ sal_Bool PreparedStatement::execute( )
                         buf.append( m_vars[vars] );
 
                         // skip to the end of the named parameter
-                        for( ; index < str.getLength() &&
-                                 ! ( isWhitespace( str[index] ) || isOperator( str[index] ) ) ; index ++ );
+                        while (   index < str.getLength()
+                               && !(   isWhitespace(str[index])
+                                    || isOperator  (str[index])))
+                        {
+                            ++index;
+                        }
                         start = index;
                         vars ++;
                     }


More information about the Libreoffice-commits mailing list