summaryrefslogtreecommitdiffstats
path: root/session.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2018-08-02 15:02:25 +0100
committerThomas Adam <thomas@xteddy.org>2018-08-02 15:02:25 +0100
commiteceaa9a49345d0ab1cdd2f0489acbbbf4838126a (patch)
treef60faaec2c6b99b7076ca8e86a1841ea93e18bde /session.c
parent2e19a5ecb96d5c4c9abd196b0a61ad88360530d0 (diff)
parentfb1f0fee5af3da964ec359ae2b543353ce47f996 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'session.c')
-rw-r--r--session.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/session.c b/session.c
index 95cbe3e6..9b74326a 100644
--- a/session.c
+++ b/session.c
@@ -28,7 +28,7 @@
struct sessions sessions;
static u_int next_session_id;
-struct session_groups session_groups;
+struct session_groups session_groups = RB_INITIALIZER(&session_groups);
static void session_free(int, short, void *);
@@ -40,21 +40,19 @@ static struct winlink *session_previous_alert(struct winlink *);
static void session_group_remove(struct session *);
static void session_group_synchronize1(struct session *, struct session *);
-RB_GENERATE(sessions, session, entry, session_cmp);
-
int
session_cmp(struct session *s1, struct session *s2)
{
return (strcmp(s1->name, s2->name));
}
+RB_GENERATE(sessions, session, entry, session_cmp);
-RB_GENERATE(session_groups, session_group, entry, session_group_cmp);
-
-int
+static int
session_group_cmp(struct session_group *s1, struct session_group *s2)
{
return (strcmp(s1->name, s2->name));
}
+RB_GENERATE_STATIC(session_groups, session_group, entry, session_group_cmp);
/*
* Find if session is still alive. This is true if it is still on the global