summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2009-01-04 16:54:28 +0200
committerGuillem Jover <guillem@debian.org>2009-01-04 16:54:28 +0200
commit6c0c8c0508720deefac78597fec0563ff084eb46 (patch)
treee115cffdb524052251d8def2148164c7a7d7d426 /lib
parent0268f49c4a9c2e110814ebda379f0fbe84ecb8ed (diff)
downloaddpkg-6c0c8c0508720deefac78597fec0563ff084eb46.tar.gz
libdpkg: Use MAX_CONFIG_LINE instead of MAXDIVERTFILENAME in myfileopt
Diffstat (limited to 'lib')
-rw-r--r--lib/myopt.c2
-rw-r--r--lib/myopt.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/myopt.c b/lib/myopt.c
index 717094a4c..0cf10805d 100644
--- a/lib/myopt.c
+++ b/lib/myopt.c
@@ -48,7 +48,7 @@ badusage(const char *fmt, ...)
void myfileopt(const char* fn, const struct cmdinfo* cmdinfos) {
FILE* file;
- char linebuf[MAXDIVERTFILENAME];
+ char linebuf[MAX_CONFIG_LINE];
file= fopen(fn, "r");
if (!file) {
diff --git a/lib/myopt.h b/lib/myopt.h
index 29f300e55..9c3dfeeda 100644
--- a/lib/myopt.h
+++ b/lib/myopt.h
@@ -42,6 +42,8 @@ struct cmdinfo {
void badusage(const char *fmt, ...) NONRETURNING PRINTFFORMAT(1, 2);
+#define MAX_CONFIG_LINE 1024
+
void myfileopt(const char* fn, const struct cmdinfo* cmdinfos);
void myopt(const char *const **argvp, const struct cmdinfo *cmdinfos);
void loadcfgfile(const char *prog, const struct cmdinfo *cmdinfos);