fsck: make sure we don't read an unitialized variable
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 11 Feb 2021 08:50:49 +0000 (09:50 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 12 Mar 2021 16:35:56 +0000 (17:35 +0100)
commitdd04760980a0116267d33713348ae8c0f73a6052
tree13d2fff9c37bf5b5a86f724605063cdb735ab85d
parent530dcf9bb22f18d37d4011940b6b7b6d9c759d6b
fsck: make sure we don't read an unitialized variable

This use on %n was completely unnecessary: fprintf returns the number of
characters written. And the issue was that if fprintf failed for whatever
reason, it would not process the %n and m would be unitialized. Rework the
code a bit to simplify it.

Coverity CID#1444708.

(cherry picked from commit 333ab199a12c7b060d3a3f4d50a8f73ee4fd5ebd)
src/fsck/fsck.c