mirror of
https://github.com/javalsai/lidm.git
synced 2025-09-01 02:47:59 +02:00
chore: use size_t
for indexing and iterating
This commit is contained in:
@@ -26,7 +26,7 @@ int chvt_str(char *str) {
|
||||
int chvt(int n) {
|
||||
fprintf(stderr, "activating vt %d\n", n);
|
||||
char c = 0;
|
||||
for (int i = 0; i < sizeof(vterms) / sizeof(vterms[0]); i++) {
|
||||
for (size_t i = 0; i < sizeof(vterms) / sizeof(vterms[0]); i++) {
|
||||
int fd = open(vterms[i], O_RDWR);
|
||||
if (fd >= 0 && isatty(fd) && ioctl(fd, KDGKBTYPE, &c) == 0 && c < 3) {
|
||||
if (ioctl(fd, VT_ACTIVATE, n) < 0 || ioctl(fd, VT_WAITACTIVE, n) < 0) {
|
||||
|
Reference in New Issue
Block a user