From fef78131a46462ee1d1457aa690c52a52b23151a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 5 Sep 2010 12:31:22 +0100 Subject: Fix compiler warnings. Also fixing irc_send_motd(), which so far got away with a horrible practice of reading the MOTD file one by one. --- help.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'help.c') diff --git a/help.c b/help.c index c43d0459..14156eaf 100644 --- a/help.c +++ b/help.c @@ -156,8 +156,9 @@ char *help_get( help_t **help, char *title ) return NULL; } - lseek( h->fd, h->offset.file_offset, SEEK_SET ); - read( h->fd, s, h->length ); + if( lseek( h->fd, h->offset.file_offset, SEEK_SET ) == -1 || + read( h->fd, s, h->length ) != h->length ) + return NULL; } else { -- cgit v1.2.3