]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/login/logind-seat.c
logind: make VT numbers unsigned
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 28 Nov 2013 16:05:34 +0000 (17:05 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 28 Nov 2013 16:38:16 +0000 (17:38 +0100)
commit92bd5ff3a062c3f9475b9d9d39b9335bfeb7705e
tree0769b098958778286b006da515dca801c64e30d3
parent92fe133abf2de889659464ae8affd1db1710f72e
logind: make VT numbers unsigned

Fix the whole code to use "unsigned int" for vtnr. 0 is an invalid vtnr so
we don't need negative numbers at all.

Note that most code already assumes it's unsigned so in case there's a
negative vtnr, our code may, under special circumstances, silently break.
So this patch makes sure all sources of vtnrs verify the validity. Also
note that the dbus api already uses unsigned ints.
src/login/loginctl.c
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-seat.c
src/login/logind-seat.h
src/login/logind-session.c
src/login/logind-session.h
src/login/logind.h
src/login/pam-module.c