From 92bd5ff3a062c3f9475b9d9d39b9335bfeb7705e Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 28 Nov 2013 17:05:34 +0100 Subject: 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/logind-seat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/login/logind-seat.h') diff --git a/src/login/logind-seat.h b/src/login/logind-seat.h index 80c6b8bd92..1254268f10 100644 --- a/src/login/logind-seat.h +++ b/src/login/logind-seat.h @@ -55,7 +55,7 @@ int seat_load(Seat *s); int seat_apply_acls(Seat *s, Session *old_active); int seat_set_active(Seat *s, Session *session); -int seat_active_vt_changed(Seat *s, int vtnr); +int seat_active_vt_changed(Seat *s, unsigned int vtnr); int seat_read_active_vt(Seat *s); int seat_preallocate_vts(Seat *s); -- cgit v1.2.3-54-g00ecf