[PATCH] Extend buffer size because line size is greater than 1024 chars

From: Michal Simek
Date: Tue Mar 30 2010 - 04:45:06 EST


Error shown on console

UdpLite:
InDatagrams: 0
NoPorts: 0
InErrors: 0
OutDatagrams: 0
RcvbufErrors: 0
SndbufErrors: 0
error parsing /proc/net/snmp: Success

It is easy to check size of line which is necessary to check.

1151

Signed-off-by: Michal Simek <monstr@xxxxxxxxx>
---
statistics.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/statistics.c b/statistics.c
index a878df8..51beb8a 100644
--- a/statistics.c
+++ b/statistics.c
@@ -291,7 +291,7 @@ struct tabtab *newtable(struct tabtab *tabs, char *title)

void process_fd(FILE *f)
{
- char buf1[1024], buf2[1024];
+ char buf1[2048], buf2[2048];
char *sp, *np, *p;
while (fgets(buf1, sizeof buf1, f)) {
int endflag;
--
1.5.5.1


--------------080408020503010204010104--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/