]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/fsck/fsck.c
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>
Thu, 11 Feb 2021 08:50:49 +0000 (09:50 +0100)
commit333ab199a12c7b060d3a3f4d50a8f73ee4fd5ebd
tree4f5b646d7d294a511c8c3fea78395d6750383eca
parent363729c4704b9838f351eaba3acb8b1ed16fae0e
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.
src/fsck/fsck.c