From ddb5865339a2015672dad6f42cbf2ae77f872687 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 7 Dec 2011 16:40:11 +0000 Subject: [PATCH] fix cosmetic bug in /proc/mediaproxy/list table 0 is now shown correctly in output. also reformatted output to make it more useful to scripts. --- kernel-module/ipt_MEDIAPROXY.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel-module/ipt_MEDIAPROXY.c b/kernel-module/ipt_MEDIAPROXY.c index 3e087e686..666eee283 100644 --- a/kernel-module/ipt_MEDIAPROXY.c +++ b/kernel-module/ipt_MEDIAPROXY.c @@ -426,8 +426,8 @@ static void *proc_main_list_next(struct seq_file *f, void *v, loff_t *o) { /* v return NULL; id = *o; - while (id++ < MAX_ID) { - t = get_table(id); + while (id < MAX_ID) { + t = get_table(id++); if (!t) continue; break; @@ -441,7 +441,7 @@ static void *proc_main_list_next(struct seq_file *f, void *v, loff_t *o) { /* v static int proc_main_list_show(struct seq_file *f, void *v) { struct mediaproxy_table *g = v; - seq_printf(f, "table %u present\n", g->id); + seq_printf(f, "%u\n", g->id); table_push(g); return 0;