From 794aafe349fb37e75630a7fca8da7a1cfe6f4c40 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 4 Jan 2000 19:19:07 +0000 Subject: Added "crap" fix for rotating string buffers. (Increased to 20, added #define). Andrew - please fix this properly when you have time :-). Jeremy. (This used to be commit 8515bdb39c603864246d3a4ff2349fa76b0bd86e) --- source3/param/loadparm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source3/param/loadparm.c') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index e24877e124..6d82554130 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -1090,6 +1090,7 @@ static void init_locals(void) } } +#define NUMBER_OF_STATIC_STRING_BUFS 20 /******************************************************************* a convenience routine to grab string parameters into a rotating buffer, @@ -1098,8 +1099,8 @@ callers without affecting the source string. ********************************************************************/ static char *lp_string(const char *s) { - static char *bufs[10]; - static size_t buflen[10]; + static char *bufs[NUMBER_OF_STATIC_STRING_BUFS]; + static size_t buflen[NUMBER_OF_STATIC_STRING_BUFS]; static int next = -1; char *ret; int i; @@ -1107,7 +1108,7 @@ static char *lp_string(const char *s) if (next == -1) { /* initialisation */ - for (i=0;i<10;i++) { + for (i=0;i