summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Eitzenberger <heitzenberger@astaro.com>2009-10-12 09:47:55 +0200
committerHarald Welte <laforge@gnumonks.org>2010-10-21 19:15:37 +0200
commit69a43f386bcd0a37d9074cb7587a1b6a33d4e5d6 (patch)
tree64c944bc5b9ec19242dbdd637ddece6f796d2779
parentbb19fdb80b690ef6400a9145953c6dbb58dbef17 (diff)
db: remove column debugging aid
Easy computable, therefore no need. Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
-rw-r--r--include/ulogd/db.h3
-rw-r--r--src/db.c8
2 files changed, 1 insertions, 10 deletions
diff --git a/include/ulogd/db.h b/include/ulogd/db.h
index f237426..4846f30 100644
--- a/include/ulogd/db.h
+++ b/include/ulogd/db.h
@@ -40,9 +40,6 @@ struct db_row {
struct db_column {
struct ulogd_key *key;
-
- /* just handy for debugging, may be removed later */
- int num;
};
#define DB_F_OPEN 0x0001
diff --git a/src/db.c b/src/db.c
index 8cdbb53..49becad 100644
--- a/src/db.c
+++ b/src/db.c
@@ -170,8 +170,6 @@ err_rollback:
static int
db_alloc_columns(struct db_instance *di, size_t cols)
{
- int i;
-
if (!di)
return -1;
@@ -181,9 +179,6 @@ db_alloc_columns(struct db_instance *di, size_t cols)
return -1;
}
- for (i = 0; i < cols; i++)
- di->col[i].num = i;
-
return 0;
}
@@ -675,8 +670,7 @@ ulogd_db_interp(struct ulogd_pluginstance *pi, unsigned *flags)
return ULOGD_IRET_OK;
/* reset key pointers */
- for (i = 0; i < di->num_cols; i++)
- di->col[i].key = NULL;
+ memset(di->col, 0, di->num_cols * sizeof(di->col[0]));
for (i = 0; i < pi->input.num_keys; i++) {
key = &in[i];