]> git.sur5r.net Git - openldap/blobdiff - libraries/libldif/fetch.c
Fix cred passing.
[openldap] / libraries / libldif / fetch.c
index 69c15b77493e22f61a46525a64d240fbf837de91..94d08614552668a42a52c28177a3eab6c7c9e6c9 100644 (file)
@@ -1,4 +1,5 @@
 /* line64.c - routines for dealing with the slapd line format */
+/* $OpenLDAP$ */
 /*
  * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
@@ -71,7 +72,7 @@ ldif_fetch_url(
 
        total = 0;
 
-       while( bytes = fread( buffer, 1, sizeof(buffer), url ) ) {
+       while( (bytes = fread( buffer, 1, sizeof(buffer), url )) != 0 ) {
                char *newp = ber_memrealloc( p, total + bytes );
                if( newp == NULL ) {
                        ber_memfree( p );
@@ -90,4 +91,3 @@ ldif_fetch_url(
 
        return 0;
 }
-