From: Olivier Matz Date: Sun, 2 Jan 2011 18:44:04 +0000 (+0100) Subject: cmdline: use a macro for maximum token size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=11ba5b954689047f664873706964dc72878329f2;p=libcmdline.git cmdline: use a macro for maximum token size Signed-off-by: Olivier Matz --- diff --git a/src/lib/cmdline_rdline.c b/src/lib/cmdline_rdline.c index 5783d65..4352b94 100644 --- a/src/lib/cmdline_rdline.c +++ b/src/lib/cmdline_rdline.c @@ -68,6 +68,7 @@ #include "cmdline_cirbuf.h" #include "cmdline_rdline.h" +#include "cmdline_parse.h" static void rdline_puts(struct rdline *rdl, const char *buf); static void rdline_miniprintf(struct rdline *rdl, @@ -370,7 +371,7 @@ rdline_char_in(struct rdline *rdl, char c) cirbuf_align_left(&rdl->left); rdl->left_buf[CIRBUF_GET_LEN(&rdl->left)] = '\0'; if (rdl->complete) { - char tmp_buf[BUFSIZ]; + char tmp_buf[CMDLINE_MAX_TOKEN_SIZE]; int complete_state; int ret; unsigned int tmp_size;