add some consts

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5519 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1999-03-11 16:55:55 +00:00
parent a86456f9b5
commit bb65c45e21
2 changed files with 11 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan
* Copyright (c) 1995, 1996, 1997, 1999 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -41,7 +41,8 @@
RCSID("$Id$");
void
prepare_utmp (struct utmp *utmp, char *tty, char *username, char *hostname)
prepare_utmp (struct utmp *utmp, char *tty,
const char *username, const char *hostname)
{
char *ttyx = clean_ttyname (tty);
@@ -81,12 +82,15 @@ prepare_utmp (struct utmp *utmp, char *tty, char *username, char *hostname)
}
#ifdef HAVE_UTMPX_H
void utmp_login(char *tty, char *username, char *hostname) { return; }
void utmp_login(char *tty, const char *username, const char *hostname)
{
return;
}
#else
/* update utmp and wtmp - the BSD way */
void utmp_login(char *tty, char *username, char *hostname)
void utmp_login(char *tty, const char *username, const char *hostname)
{
struct utmp utmp;
int fd;

View File

@@ -7,11 +7,11 @@ RCSID("$Id$");
/* utmpx_login - update utmp and wtmp after login */
#ifndef HAVE_UTMPX_H
int utmpx_login(char *line, char *user, char *host) { return 0; }
int utmpx_login(char *line, const char *user, const char *host) { return 0; }
#else
static void
utmpx_update(struct utmpx *ut, char *line, char *user, char *host)
utmpx_update(struct utmpx *ut, char *line, const char *user, const char *host)
{
struct timeval tmp;
char *clean_tty = clean_ttyname(line);
@@ -49,7 +49,7 @@ utmpx_update(struct utmpx *ut, char *line, char *user, char *host)
}
int
utmpx_login(char *line, char *user, char *host)
utmpx_login(char *line, const char *user, const char *host)
{
struct utmpx *ut;
pid_t mypid = getpid();