]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/machine/machined-dbus.c
tree-wide: check if return value of lseek() and friends is negative
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Oct 2023 04:52:47 +0000 (13:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 Oct 2023 09:31:44 +0000 (18:31 +0900)
commit86cbbc6d052bc3cc97aa2ece58603a9939f9ee6a
tree6186d2df19cd787bdc5530462ee063fe8cff8cbc
parent4820c9d41748640ce6a29fc76d6463c822a31662
tree-wide: check if return value of lseek() and friends is negative

We usually check return value of syscalls or glibc functions by it is
negative or not, something like that `if (stat(path, &st) < 0)`.
Let's also use the same style for lseek() and friends even the type of
their return value is off_t.

Note, fseeko() returns int, instead of off_t.
15 files changed:
src/basic/io-util.c
src/boot/bootctl-install.c
src/core/execute.c
src/core/main.c
src/coredump/coredump.c
src/home/homed-home.c
src/import/import-raw.c
src/import/pull-job.c
src/import/pull-raw.c
src/journal-remote/journal-gatewayd.c
src/machine/machined-dbus.c
src/partition/repart.c
src/shared/elf-util.c
src/shared/machine-id-setup.c
src/shared/tpm2-util.c