mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 18:38:00 +02:00
style: formatting and linter satisfaction
This commit is contained in:
16
src/ui.c
16
src/ui.c
@@ -20,13 +20,13 @@
|
||||
#include "auth.h"
|
||||
#include "efield.h"
|
||||
#include "keys.h"
|
||||
#include "launch_state.h"
|
||||
#include "ofield.h"
|
||||
#include "sessions.h"
|
||||
#include "ui.h"
|
||||
#include "ui_state.h"
|
||||
#include "users.h"
|
||||
#include "util.h"
|
||||
#include "launch_state.h"
|
||||
|
||||
const u_char INPUTS_N = 3;
|
||||
|
||||
@@ -200,9 +200,11 @@ int load(struct Vector* users, struct Vector* sessions) {
|
||||
of_passwd = ofield_new(0);
|
||||
|
||||
struct LaunchState initial_state = read_launch_state();
|
||||
if(initial_state.user_opt > users->length || initial_state.session_opt > sessions->length + g_config->behavior.include_defshell) {
|
||||
initial_state.user_opt = 1;
|
||||
initial_state.session_opt = 1;
|
||||
if (initial_state.user_opt > users->length ||
|
||||
initial_state.session_opt >
|
||||
sessions->length + g_config->behavior.include_defshell) {
|
||||
initial_state.user_opt = 1;
|
||||
initial_state.session_opt = 1;
|
||||
}
|
||||
of_user.current_opt = initial_state.user_opt;
|
||||
of_session.current_opt = initial_state.session_opt;
|
||||
@@ -264,9 +266,9 @@ int load(struct Vector* users, struct Vector* sessions) {
|
||||
} else {
|
||||
if (len == 1 && *seq == '\n') {
|
||||
struct LaunchState ls;
|
||||
ls.user_opt = of_user.current_opt;
|
||||
ls.session_opt = of_session.current_opt;
|
||||
write_launch_state(ls);
|
||||
ls.user_opt = of_user.current_opt;
|
||||
ls.session_opt = of_session.current_opt;
|
||||
write_launch_state(ls);
|
||||
|
||||
if (!launch(st_user().username, of_passwd.efield.content,
|
||||
st_session(g_config->behavior.include_defshell),
|
||||
|
Reference in New Issue
Block a user