lint: apply new style

This commit is contained in:
2025-06-06 20:46:55 +02:00
parent d6a348c543
commit 7d76687833
19 changed files with 259 additions and 273 deletions

View File

@@ -5,11 +5,11 @@
#include "chvt.h"
static char *vterms[] = {"/dev/tty", "/dev/tty0", "/dev/vc/0", "/dev/systty",
static char* vterms[] = {"/dev/tty", "/dev/tty0", "/dev/vc/0", "/dev/systty",
"/dev/console"};
int chvt_str(char *str) {
char *err;
int chvt_str(char* str) {
char* err;
errno = 0;
long i = strtol(str, &err, 10);
if (errno) {
@@ -17,8 +17,7 @@ int chvt_str(char *str) {
return -1;
}
// I'm not gonna elaborate on this....
if (i > INT_MAX || i < INT_MIN || *err)
return -1;
if (i > INT_MAX || i < INT_MIN || *err) return -1;
return chvt((int)i);
}