]> git.sur5r.net Git - openldap/blobdiff - servers/slurpd/fm.c
Add OpenLDAP RCSid to *.[ch] in clients, libraries, and servers.
[openldap] / servers / slurpd / fm.c
index 0cb813caca42e86d1f30255f7f3f0857ecc0d1a1..75c1afed027b74da2036f8bc638b748c3adeab35 100644 (file)
@@ -1,3 +1,4 @@
+/* $OpenLDAP$ */
 /*
  * Copyright (c) 1996 Regents of the University of Michigan.
  * All rights reserved.
@@ -17,8 +18,8 @@
 #include "portable.h"
 
 #include <stdio.h>
-#include <stdlib.h>                    /* get free() */
 
+#include <ac/stdlib.h>
 #include <ac/string.h>
 #include <ac/signal.h>
 
@@ -229,12 +230,13 @@ get_record(
 
     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 );
 }