Browse code

db_text - fix indentation

Luis Azedo authored on 16/02/2015 14:52:02
Showing 2 changed files
... ...
@@ -340,13 +340,13 @@ int dbt_raw_query(db1_con_t* _h, char* _s, db1_res_t** _r)
340 340
  */
341 341
 int dbt_affected_rows(db1_con_t* _h)
342 342
 {
343
-    if (!_h || !CON_TABLE(_h))
344
-    {
345
-        LM_ERR("invalid parameter\n");
346
-        return -1;
347
-    }
343
+	if (!_h || !CON_TABLE(_h))
344
+	{
345
+		LM_ERR("invalid parameter\n");
346
+		return -1;
347
+	}
348 348
 
349
-    return ((dbt_con_p)_h->tail)->affected;
349
+	return ((dbt_con_p)_h->tail)->affected;
350 350
 }
351 351
 
352 352
 /*
... ...
@@ -364,8 +364,8 @@ int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, int _n)
364 364
 		LM_ERR("invalid parameter\n");
365 365
 		return -1;
366 366
 	}
367
- 
368
-    ((dbt_con_p)_h->tail)->affected = 0;
367
+
368
+	((dbt_con_p)_h->tail)->affected = 0;
369 369
     
370 370
 	if(!_k || !_v || _n<=0)
371 371
 	{
... ...
@@ -424,7 +424,7 @@ int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, int _n)
424 424
 		goto clean;
425 425
 	}
426 426
 
427
-    ((dbt_con_p)_h->tail)->affected = 1;
427
+	((dbt_con_p)_h->tail)->affected = 1;
428 428
     
429 429
 	/* dbt_print_table(_tbc, NULL); */
430 430
 	
... ...
@@ -471,7 +471,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n)
471 471
 		return -1;
472 472
 	}
473 473
 
474
-    ((dbt_con_p)_h->tail)->affected = 0;
474
+	((dbt_con_p)_h->tail)->affected = 0;
475 475
 
476 476
 	/* lock database */
477 477
 	_tbc = dbt_db_get_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
... ...
@@ -485,7 +485,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n)
485 485
 	if(!_k || !_v || _n<=0)
486 486
 	{
487 487
 		LM_DBG("deleting all records\n");
488
-        ((dbt_con_p)_h->tail)->affected = _tbc->nrrows;
488
+		((dbt_con_p)_h->tail)->affected = _tbc->nrrows;
489 489
 		dbt_table_free_rows(_tbc);
490 490
 		/* unlock databse */
491 491
 		dbt_release_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
... ...
@@ -513,7 +513,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v, int _n)
513 513
 			// free row
514 514
 			dbt_row_free(_tbc, _drp);
515 515
 
516
-            ((dbt_con_p)_h->tail)->affected++;
516
+			((dbt_con_p)_h->tail)->affected++;
517 517
 
518 518
 		}
519 519
 		_drp = _drp0;
... ...
@@ -556,7 +556,7 @@ int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
556 556
 		return -1;
557 557
 	}
558 558
 
559
-    ((dbt_con_p)_h->tail)->affected = 0;
559
+	((dbt_con_p)_h->tail)->affected = 0;
560 560
     
561 561
 	/* lock database */
562 562
 	_tbc = dbt_db_get_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
... ...
@@ -597,7 +597,7 @@ int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
597 597
 				}
598 598
 			}
599 599
 
600
-            ((dbt_con_p)_h->tail)->affected++;
600
+			((dbt_con_p)_h->tail)->affected++;
601 601
 
602 602
 		}
603 603
 		_drp = _drp->next;
... ...
@@ -47,7 +47,7 @@ typedef struct _dbt_result
47 47
 typedef struct _dbt_con
48 48
 {
49 49
 	dbt_cache_p con;
50
-    int affected;
50
+	int affected;
51 51
 } dbt_con_t, *dbt_con_p;
52 52
 
53 53
 #define DBT_CON_CONNECTION(db_con) (((dbt_con_p)((db_con)->tail))->con)