]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lslogins: consolidate and optimize utmp files use
authorKarel Zak <kzak@redhat.com>
Thu, 15 Jul 2021 10:24:07 +0000 (12:24 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 15 Jul 2021 10:24:07 +0000 (12:24 +0200)
commit913829559b19a6a13e3574a3e0746410a7005ffb
treeffd3bc8a30bb88c2dbfd55ea9171c6ac0655d7f0
parent5b65b68cd8c57766e236a47500f969fee4230772
lslogins: consolidate and optimize utmp files use

* the original read_utmp() code is from GPLv3+, but lslogins is GPLv2+
  (see https://github.com/karelzak/util-linux/commit/a6bf40ee77a85f5108208dc764b5d023a07998f5#commitcomment-53407151)

* remove redundant parse_btmp() and parse_wtmp() as it does not
  provide anything

* reduce realloc() calls, allocate all in one step

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/lslogins.c