os: fix nreadelements naming

pull/3134/head
Abdullah Atta 2019-12-18 10:22:52 +05:00 committed by Alexander Medvednikov
parent 489ec05b23
commit 20e73ff69a
1 changed files with 2 additions and 2 deletions

View File

@ -98,9 +98,9 @@ pub fn read_bytes(path string) ?[]byte {
C.rewind(fp) C.rewind(fp)
mut res := [`0`].repeat(fsize) mut res := [`0`].repeat(fsize)
nreadelements := C.fread(res.data, fsize, 1, fp) nr_read_elements := C.fread(res.data, fsize, 1, fp)
C.fclose(fp) C.fclose(fp)
return res[0..nreadelements * fsize] return res[0..nr_read_elements * fsize]
} }
// read_file reads the file in `path` and returns the contents. // read_file reads the file in `path` and returns the contents.