From: Howard Chu Date: Fri, 11 Apr 2008 12:20:01 +0000 (+0000) Subject: Cleanup prev commit X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~22 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=19ad1e2a741d8802cd5272024a3353f35f869be6;p=openldap Cleanup prev commit --- diff --git a/servers/slapd/slapcat.c b/servers/slapd/slapcat.c index b8da193d30..6ea1952006 100644 --- a/servers/slapd/slapcat.c +++ b/servers/slapd/slapcat.c @@ -84,7 +84,6 @@ slapcat( int argc, char **argv ) char *data; int len; Entry* e; - int writerc; if ( gotsig ) break; @@ -124,16 +123,8 @@ slapcat( int argc, char **argv ) break; } - writerc = fputs( data, ldiffp->fp ); - if ( writerc == EOF ) { - fprintf(stderr, "%s: error writing output.\n", - progname); - rc = EXIT_FAILURE; - break; - } - - writerc = fputs( "\n", ldiffp->fp ); - if ( writerc == EOF ) { + if ( fputs( data, ldiffp->fp ) == EOF || + fputs( "\n", ldiffp->fp ) == EOF ) { fprintf(stderr, "%s: error writing output.\n", progname); rc = EXIT_FAILURE;