Commit d101006d774c3174983d89ffae65c9e8a65c4b55

Verify the result of fwrite.
  
99#include <ctype.h>
1010#include <sys/time.h>
1111#include <sys/types.h>
12#include <sysexits.h>
1213
1314#ifdef USE_ASSERT
1415# include <assert.h>
111111static void outputLineDirect(struct logfile *lf) {
112112 assert(lf != NULL);
113113 assert(lf->line != NULL);
114 fwrite(lf->line, lf->lineLength, 1, stdout);
114 if(fwrite(lf->line, lf->lineLength, 1, stdout) < lf->lineLength) {
115 perror("fwrite");
116 exit(EX_IOERR);
117 }
115118}
116119
117120/**
logfiles.h
(1 / 1)
  
4141 /* The current record */
4242 char *line;
4343 /* Look! I know pascal! */
44 int lineLength;
44 size_t lineLength;
4545 /* Function to output the current line */
4646 void (*outputLine)(struct logfile *);
4747 /* The timestamp of the current record */