]> git.itanic.dy.fi Git - rrdd/commit
script_parser: Fix fread to return number of bytes read
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 27 Jun 2012 19:00:50 +0000 (22:00 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Wed, 27 Jun 2012 19:43:07 +0000 (22:43 +0300)
commit4d590108a442e6b639552055c67b128b5a88bafc
tree297abbac3d4888e49d0ebeaeb788b49fbddcd199
parent523bea4c7a4c6e30c1220bc653375499c30143f3
script_parser: Fix fread to return number of bytes read

From fread man page:

The function fread() reads nmemb elements of data, each size bytes
long, from the stream pointed to by stream, storing them at the
location given by ptr.

If size is something else than 1, the return value is not number of
bytes read. The intention here is to have it return number of bytes so
that the debug print can print it correctly.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
parser.c