fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

lib: Check return value of fread() in load.c

The return value of fread() should be ignored in this case, but is
checked anyway to silence compiler warnings.

Hampa Hug ccb6d68f 517d4f83

+5 -3
+5 -3
src/lib/load.c
··· 5 5 /***************************************************************************** 6 6 * File name: src/lib/load.c * 7 7 * Created: 2004-08-02 by Hampa Hug <hampa@hampa.ch> * 8 - * Copyright: (C) 2004-2009 Hampa Hug <hampa@hampa.ch> * 8 + * Copyright: (C) 2004-2010 Hampa Hug <hampa@hampa.ch> * 9 9 *****************************************************************************/ 10 10 11 11 /***************************************************************************** ··· 35 35 36 36 int pce_load_blk_bin (mem_blk_t *blk, const char *fname) 37 37 { 38 - FILE *fp; 38 + size_t r; 39 + FILE *fp; 39 40 40 41 fp = fopen (fname, "rb"); 42 + 41 43 if (fp == NULL) { 42 44 return (1); 43 45 } 44 46 45 - fread (blk->data, 1, blk->size, fp); 47 + r = fread (blk->data, 1, blk->size, fp); 46 48 47 49 fclose (fp); 48 50