summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-12-08 07:46:53 +0000
committercharnier <charnier@FreeBSD.org>1997-12-08 07:46:53 +0000
commit9a016c78e25d6e9245274ded345e7fa88cf5a906 (patch)
treedd940550a7bba7e64e7c1689a005549851d3a79c /libexec
parenta4e10096ad7d4a2ffd8abf94117c7f9595b27605 (diff)
downloadFreeBSD-src-9a016c78e25d6e9245274ded345e7fa88cf5a906.zip
FreeBSD-src-9a016c78e25d6e9245274ded345e7fa88cf5a906.tar.gz
Sync with diffs I found in kerberised versions: -Wall, no `;' in macros.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/telnetd/slc.c44
-rw-r--r--libexec/telnetd/state.c6
-rw-r--r--libexec/telnetd/utility.c2
3 files changed, 25 insertions, 27 deletions
diff --git a/libexec/telnetd/slc.c b/libexec/telnetd/slc.c
index f0c9835..9578e52 100644
--- a/libexec/telnetd/slc.c
+++ b/libexec/telnetd/slc.c
@@ -36,14 +36,14 @@
static char sccsid[] = "@(#)slc.c 8.1 (Berkeley) 6/4/93";
#endif
static const char rcsid[] =
- "$Id$";
+ "$Id: slc.c,v 1.6 1997/12/03 07:15:58 charnier Exp $";
#endif /* not lint */
#include "telnetd.h"
#ifdef LINEMODE
/*
- * local varibles
+ * local variables
*/
static unsigned char *def_slcbuf = (unsigned char *)0;
static int def_slclen = 0;
@@ -292,15 +292,15 @@ change_slc(func, flag, val)
register int hislevel, mylevel;
hislevel = flag & SLC_LEVELBITS;
- mylevel = slctab[func].defset.flag & SLC_LEVELBITS;
+ mylevel = slctab[(int)func].defset.flag & SLC_LEVELBITS;
/*
* If client is setting a function to NOSUPPORT
* or DEFAULT, then we can easily and directly
* accomodate the request.
*/
if (hislevel == SLC_NOSUPPORT) {
- slctab[func].current.flag = flag;
- slctab[func].current.val = (cc_t)_POSIX_VDISABLE;
+ slctab[(int)func].current.flag = flag;
+ slctab[(int)func].current.val = (cc_t)_POSIX_VDISABLE;
flag |= SLC_ACK;
add_slc(func, flag, val);
return;
@@ -313,13 +313,13 @@ change_slc(func, flag, val)
* default level of DEFAULT.
*/
if (mylevel == SLC_DEFAULT) {
- slctab[func].current.flag = SLC_NOSUPPORT;
+ slctab[(int)func].current.flag = SLC_NOSUPPORT;
} else {
- slctab[func].current.flag = slctab[func].defset.flag;
+ slctab[(int)func].current.flag = slctab[(int)func].defset.flag;
}
- slctab[func].current.val = slctab[func].defset.val;
- add_slc(func, slctab[func].current.flag,
- slctab[func].current.val);
+ slctab[(int)func].current.val = slctab[(int)func].defset.val;
+ add_slc(func, slctab[(int)func].current.flag,
+ slctab[(int)func].current.val);
return;
}
@@ -333,13 +333,13 @@ change_slc(func, flag, val)
* the place to put the new value, so change it,
* otherwise, continue the negotiation.
*/
- if (slctab[func].sptr) {
+ if (slctab[(int)func].sptr) {
/*
* We can change this one.
*/
- slctab[func].current.val = val;
- *(slctab[func].sptr) = val;
- slctab[func].current.flag = flag;
+ slctab[(int)func].current.val = val;
+ *(slctab[(int)func].sptr) = val;
+ slctab[(int)func].current.flag = flag;
flag |= SLC_ACK;
slcchange = 1;
add_slc(func, flag, val);
@@ -359,24 +359,23 @@ change_slc(func, flag, val)
* our value as well.
*/
if (mylevel == SLC_DEFAULT) {
- slctab[func].current.flag = flag;
- slctab[func].current.val = val;
+ slctab[(int)func].current.flag = flag;
+ slctab[(int)func].current.val = val;
flag |= SLC_ACK;
} else if (hislevel == SLC_CANTCHANGE &&
mylevel == SLC_CANTCHANGE) {
flag &= ~SLC_LEVELBITS;
flag |= SLC_NOSUPPORT;
- slctab[func].current.flag = flag;
+ slctab[(int)func].current.flag = flag;
} else {
flag &= ~SLC_LEVELBITS;
flag |= mylevel;
- slctab[func].current.flag = flag;
+ slctab[(int)func].current.flag = flag;
if (mylevel == SLC_CANTCHANGE) {
- slctab[func].current.val =
- slctab[func].defset.val;
- val = slctab[func].current.val;
+ slctab[(int)func].current.val =
+ slctab[(int)func].defset.val;
+ val = slctab[(int)func].current.val;
}
-
}
add_slc(func, flag, val);
}
@@ -427,7 +426,6 @@ check_slc()
slctab[i].current.val);
}
}
-
} /* check_slc */
/*
diff --git a/libexec/telnetd/state.c b/libexec/telnetd/state.c
index 6693077..aeb64bb 100644
--- a/libexec/telnetd/state.c
+++ b/libexec/telnetd/state.c
@@ -1450,7 +1450,7 @@ doclientstat()
clientstat(TELOPT_LINEMODE, WILL, 0);
}
-#define ADD(c) *ncp++ = c;
+#define ADD(c) *ncp++ = c
#define ADD_DATA(c) { *ncp++ = c; if (c == SE) *ncp++ = c; }
void
send_status()
@@ -1502,14 +1502,14 @@ send_status()
ADD(SE);
if (restartany >= 0) {
- ADD(SB)
+ ADD(SB);
ADD(TELOPT_LFLOW);
if (restartany) {
ADD(LFLOW_RESTART_ANY);
} else {
ADD(LFLOW_RESTART_XON);
}
- ADD(SE)
+ ADD(SE);
ADD(SB);
}
}
diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c
index 4735be3..4d1f6a1 100644
--- a/libexec/telnetd/utility.c
+++ b/libexec/telnetd/utility.c
@@ -343,7 +343,7 @@ fatalperror(f, msg)
{
char buf[BUFSIZ], *strerror();
- (void) sprintf(buf, "%s: %s\r\n", msg, strerror(errno));
+ (void) sprintf(buf, "%s: %s", msg, strerror(errno));
fatal(f, buf);
}
OpenPOWER on IntegriCloud