From 42c0ff4d3d9c4a90c707c043831848880a980acb Mon Sep 17 00:00:00 2001 From: Koichiro IWAO Date: Fri, 22 Sep 2017 14:43:10 +0900 Subject: [PATCH] remove trailing space --- sesman/utmp.c | 20 ++++++++++---------- sesman/utmp.h | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sesman/utmp.c b/sesman/utmp.c index 7a6aa351..c28a8dc8 100644 --- a/sesman/utmp.c +++ b/sesman/utmp.c @@ -37,7 +37,7 @@ #include #include -/* +/* * Prepare the utmpx struct and write it. * this can handle login and logout at once with the 'state' parameter */ @@ -55,12 +55,12 @@ add_xtmp_entry(int pid, const char *line, const char *user, const char *rhostnam gettimeofday(&tv, NULL); ut.ut_tv.tv_sec = tv.tv_sec; ut.ut_tv.tv_usec = tv.tv_usec; - strncpy(ut.ut_line, line , sizeof (ut.ut_line)); - strncpy(ut.ut_user, user , sizeof (ut.ut_user)); + strncpy(ut.ut_line, line , sizeof (ut.ut_line)); + strncpy(ut.ut_user, user , sizeof (ut.ut_user)); strncpy(ut.ut_host, rhostname, sizeof (ut.ut_host)); /* utmp */ - setutxent(); + setutxent(); pututxline(&ut); endutxent (); @@ -70,25 +70,25 @@ add_xtmp_entry(int pid, const char *line, const char *user, const char *rhostnam return 0; } -int +int utmp_login(int pid, int display, const char *user, const char *rhostname) { char str_display[16]; - log_message(LOG_LEVEL_DEBUG, - "adding login info for utmp/wtmp: %d - %d - %s - %s", + log_message(LOG_LEVEL_DEBUG, + "adding login info for utmp/wtmp: %d - %d - %s - %s", pid, display, user, rhostname); g_snprintf(str_display, 15, XRDP_LINE_FORMAT, display); return add_xtmp_entry(pid, str_display, user, rhostname, USER_PROCESS); } -int +int utmp_logout(int pid, int display, const char *user, const char *rhostname) { char str_display[16]; - log_message(LOG_LEVEL_DEBUG, - "adding logout info for utmp/wtmp: %d - %d - %s - %s", + log_message(LOG_LEVEL_DEBUG, + "adding logout info for utmp/wtmp: %d - %d - %s - %s", pid, display, user, rhostname); g_snprintf(str_display, 15, XRDP_LINE_FORMAT, display); return add_xtmp_entry(pid, str_display, user, rhostname, DEAD_PROCESS); diff --git a/sesman/utmp.h b/sesman/utmp.h index 636450f3..f378ad8b 100644 --- a/sesman/utmp.h +++ b/sesman/utmp.h @@ -29,10 +29,10 @@ #define XRDP_LINE_FORMAT "xrdp:%d" /** * - * @brief - * + * @brief + * * @param pid - * @return 0 + * @return 0 */ int add_xtmp_entry(int pid, const char *line, const char *user, const char *rhostname, short state);