[LTP] [PATCH] lib: fix MemAvailable parsing

Li Wang liwang@redhat.com
Tue Sep 28 09:59:33 CEST 2021


> @@ -65,9 +65,9 @@ void tst_pollute_memory(size_t maxsize, int fillchar)
>
>  long long tst_available_mem(void)
>  {
> -       long long mem_available;
> +       long long mem_available = 0;
>

--->  unsigned long long


> -       if (FILE_LINES_SCANF("/proc/meminfo", "MemAvailable: %ld",
> +       if (FILE_LINES_SCANF("/proc/meminfo", "MemAvailable: %lld",
>

I modified it to use '%llu' and pushed.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210928/aa2f5bde/attachment.htm>


More information about the ltp mailing list