in_mem: clean up the buffer handling in proc.c (#805)
in_mem: clean up the buffer handling in proc.c (#805)

Right now, proc_stat() tries to find out the buffer size by asking
file_to_buffer() about it. This is totally unnecessary, because the
size is actually a constant (PROC_STAT_BUF_SIZE).

This patch removes the meaningless hustle surrounding read_size and
simplifies the logic of proc_stat().

Also file_to_buffer() now just uses flb_calloc(), instead of allocating
memory and initialize it with memset() by hand.

Signed-off-by: Fujimoto Seiji <ef879192bb1e41d519c82cf76440dc8e9a530806@clear-code.com>
nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit