summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/id.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-11-22 03:37:54 +0000
committerbrian <brian@FreeBSD.org>1997-11-22 03:37:54 +0000
commita7f001c816c9390acda1c72f889fd110f8d75563 (patch)
tree876d508224fb0bc9435a2e3b83f73719b56ad0b6 /usr.sbin/ppp/id.c
parent13d351d26116b6bf544f619e0de396a53d47ccd1 (diff)
downloadFreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.zip
FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.tar.gz
Fix prototypes.
Remove extraneous decls. Add ``const'' to several places. Allow ``make NOALIAS=1'' to remove IP aliasing. Merge with OpenBSD - only the Makefiles vary. We can now survive a compile with -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts (although the Makefile just contains -Wall).
Diffstat (limited to 'usr.sbin/ppp/id.c')
-rw-r--r--usr.sbin/ppp/id.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c
index 4a3d687..b807688 100644
--- a/usr.sbin/ppp/id.c
+++ b/usr.sbin/ppp/id.c
@@ -1,5 +1,5 @@
/*
- * $Id: id.c,v 1.1 1997/11/09 06:22:40 brian Exp $
+ * $Id: id.c,v 1.2 1997/11/13 17:31:52 brian Exp $
*/
#include <sys/types.h>
@@ -12,6 +12,7 @@
#include <sysexits.h>
#include <unistd.h>
+#include "command.h"
#include "mbuf.h"
#include "log.h"
#include "main.h"
@@ -37,7 +38,7 @@ ID0init()
}
static void
-ID0setuser()
+ID0setuser(void)
{
if (seteuid(uid) == -1) {
LogPrintf(LogERROR, "ID0setuser: Unable to seteuid!\n");
@@ -52,7 +53,7 @@ ID0realuid()
}
static void
-ID0set0()
+ID0set0(void)
{
if (seteuid(euid) == -1) {
LogPrintf(LogERROR, "ID0set0: Unable to seteuid!\n");
@@ -121,25 +122,25 @@ ID0open(const char *path, int flags)
}
int
-ID0uu_lock(const char *ttyname)
+ID0uu_lock(const char *basettyname)
{
int ret;
ID0set0();
- ret = uu_lock(ttyname);
- LogPrintf(LogID0, "%d = uu_lock(\"%s\")\n", ret, ttyname);
+ ret = uu_lock(basettyname);
+ LogPrintf(LogID0, "%d = uu_lock(\"%s\")\n", ret, basettyname);
ID0setuser();
return ret;
}
int
-ID0uu_unlock(const char *ttyname)
+ID0uu_unlock(const char *basettyname)
{
int ret;
ID0set0();
- ret = uu_unlock(ttyname);
- LogPrintf(LogID0, "%d = uu_unlock(\"%s\")\n", ret, ttyname);
+ ret = uu_unlock(basettyname);
+ LogPrintf(LogID0, "%d = uu_unlock(\"%s\")\n", ret, basettyname);
ID0setuser();
return ret;
}
OpenPOWER on IntegriCloud