Module: sip-router
Branch: master
Commit: b57080326a9215461a789323021d062b1a12c17f
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b57080326a9215461a789323021d062b1a12c17f

Author: Andrei Pelinescu-Onciul <[email protected]>
Committer: Andrei Pelinescu-Onciul <[email protected]>
Date:   Thu Oct  1 01:11:48 2009 +0200

libsrdb1: gcc 2.9x var decls. fixes

variable declarations must be at the beginning of the function and
not intercalated in the code.

---

 lib/srdb1/db.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
index 0cc7eeb..c4bf7cf 100644
--- a/lib/srdb1/db.c
+++ b/lib/srdb1/db.c
@@ -340,27 +340,26 @@ int db_table_version(const db_func_t* dbf, db1_con_t* 
connection, const str* tab
        db_val_t val[1];
        db1_res_t* res = NULL;
        db_val_t* ver = 0;
+       str version = str_init(VERSION_TABLE);
+       str tmp1 = str_init(TABLENAME_COLUMN);
+       str tmp2 = str_init(VERSION_COLUMN);
+       int ret;
 
        if (!dbf||!connection || !table || !table->s) {
                LM_CRIT("invalid parameter value\n");
                return -1;
        }
 
-       str version = str_init(VERSION_TABLE);
-       int ret;
-
        if (dbf->use_table(connection, &version) < 0) {
                LM_ERR("error while changing table\n");
                return -1;
        }
-       str tmp1 = str_init(TABLENAME_COLUMN);
        key[0] = &tmp1;
 
        VAL_TYPE(val) = DB1_STR;
        VAL_NULL(val) = 0;
        VAL_STR(val) = *table;
        
-       str tmp2 = str_init(VERSION_COLUMN);
        col[0] = &tmp2;
        
        if (dbf->query(connection, key, 0, val, col, 1, 1, 0, &res) < 0) {


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to