+/* $OpenLDAP$ */
/*
* Copyright (c) 1996 Regents of the University of Michigan.
* All rights reserved.
#include "portable.h"
#include <stdio.h>
-#include <stdlib.h> /* get free() */
+#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/signal.h>
)
{
FILE *fp, *lfp;
- Rq *rq = sglob->rq;
char *p;
if ( acquire_lock( f, &fp, &lfp ) < 0 ) {
while (( fgets( line, sizeof(line), fp ) != NULL ) &&
(( len = strlen( line )) > 1 )) {
- while ( lcur + len + 1 > lmax ) {
- lmax += BUFSIZ;
- buf = (char *) ch_realloc( buf, lmax );
- }
- strcpy( buf + lcur, line );
- lcur += len;
+
+ while ( lcur + len + 1 > lmax ) {
+ lmax += BUFSIZ;
+ buf = (char *) ch_realloc( buf, lmax );
+ }
+ strcpy( buf + lcur, line );
+ lcur += len;
}
return( buf );
}