From 19ad1e2a741d8802cd5272024a3353f35f869be6 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 11 Apr 2008 12:20:01 +0000 Subject: [PATCH] Cleanup prev commit --- servers/slapd/slapcat.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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; -- 2.39.5