]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/utmp-wtmp.c
shared/utmp-wtmp: avoid gcc warning about strncpy truncation
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 May 2019 12:15:46 +0000 (14:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 7 May 2019 12:15:46 +0000 (14:15 +0200)
commitf1d553e9dfd56f95b7564dd20a0b56e6a0d6492c
tree99d52173eb5be6459a8c5394489793303b502815
parentc98b3545008d8e984ab456dcf79787418fcbfe13
shared/utmp-wtmp: avoid gcc warning about strncpy truncation

The fact that strncpy does the truncation is the whole point here, and gcc
shouldn't warn about this. We can avoid the warning and simplify the
whole procedure by directly copying the interesting part.
src/shared/utmp-wtmp.c