Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libswap.c: Improve calculate swap dev number
I encounter a dead loop on following code in our test on some non-intel archrs (aarch64, ppc64le, s390x): while ((c = fgetc(fp)) != EOF) Use fgets() instead of fgetc() can avoid the above issue. Link: https://lore.kernel.org/ltp/[email protected]/ Reviewed-by: Petr Vorel <[email protected]> Signed-off-by: Wei Gao <[email protected]>
- Loading branch information