cmdline: use a macro for maximum token size
authorOlivier Matz <zer0@droids-corp.org>
Sun, 2 Jan 2011 18:44:04 +0000 (19:44 +0100)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 13 Mar 2011 10:03:24 +0000 (11:03 +0100)
Signed-off-by: Olivier Matz <zer0@droids-corp.org>
src/lib/cmdline_rdline.c

index 5783d65..4352b94 100644 (file)
@@ -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;