const poisoning.

This commit is contained in:
mycroft 1998-07-26 15:23:39 +00:00
parent decd62c2bf
commit 66427701ea
7 changed files with 29 additions and 26 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: lock.c,v 1.13 1998/07/06 06:51:23 mrg Exp $ */
/* $NetBSD: lock.c,v 1.14 1998/07/26 15:23:39 mycroft Exp $ */
/*
* Copyright (c) 1980, 1987, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1987, 1993\n\
#if 0
static char sccsid[] = "@(#)lock.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: lock.c,v 1.13 1998/07/06 06:51:23 mrg Exp $");
__RCSID("$NetBSD: lock.c,v 1.14 1998/07/26 15:23:39 mycroft Exp $");
#endif /* not lint */
/*
@ -102,7 +102,8 @@ main(argc, argv)
struct tm *timp;
time_t curtime;
int ch, sectimeout, usemine;
char *ap, *mypw, *ttynam, *tzn;
char *ap, *mypw, *ttynam;
const char *tzn;
char hostname[MAXHOSTNAMELEN + 1], s[BUFSIZ], s1[BUFSIZ];
if (!(pw = getpwuid(getuid())))

View File

@ -1,4 +1,4 @@
/* $NetBSD: su.c,v 1.24 1998/07/06 11:44:49 mrg Exp $ */
/* $NetBSD: su.c,v 1.25 1998/07/26 15:24:34 mycroft Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/
#else
__RCSID("$NetBSD: su.c,v 1.24 1998/07/06 11:44:49 mrg Exp $");
__RCSID("$NetBSD: su.c,v 1.25 1998/07/26 15:24:34 mycroft Exp $");
#endif
#endif /* not lint */
@ -88,7 +88,7 @@ static int koktologin __P((char *, char *, char *));
int main __P((int, char **));
static int chshell __P((char *));
static int chshell __P((const char *));
static char *ontty __P((void));
@ -324,9 +324,9 @@ badlogin:
static int
chshell(sh)
char *sh;
const char *sh;
{
char *cp;
const char *cp;
while ((cp = getusershell()) != NULL)
if (!strcmp(cp, sh))

View File

@ -1,4 +1,4 @@
/* $NetBSD: tftp.c,v 1.7 1997/10/20 00:46:38 lukem Exp $ */
/* $NetBSD: tftp.c,v 1.8 1998/07/26 15:26:18 mycroft Exp $ */
/*
* Copyright (c) 1983, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)tftp.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: tftp.c,v 1.7 1997/10/20 00:46:38 lukem Exp $");
__RCSID("$NetBSD: tftp.c,v 1.8 1998/07/26 15:26:18 mycroft Exp $");
#endif
#endif /* not lint */
@ -326,9 +326,9 @@ makerequest(request, name, tp, mode)
return (cp - (char *)tp);
}
struct errmsg {
const struct errmsg {
int e_code;
char *e_msg;
const char *e_msg;
} errmsgs[] = {
{ EUNDEF, "Undefined error code" },
{ ENOTFOUND, "File not found" },
@ -351,21 +351,22 @@ static void
nak(error)
int error;
{
struct errmsg *pe;
const struct errmsg *pe;
struct tftphdr *tp;
int length;
tp = (struct tftphdr *)ackbuf;
tp->th_opcode = htons((u_short)ERROR);
tp->th_code = htons((u_short)error);
for (pe = errmsgs; pe->e_code >= 0; pe++)
if (pe->e_code == error)
break;
if (pe->e_code < 0) {
pe->e_msg = strerror(error - 100);
tp->th_code = EUNDEF;
}
strcpy(tp->th_msg, strerror(error - 100));
} else {
tp->th_code = htons((u_short)error);
strcpy(tp->th_msg, pe->e_msg);
}
length = strlen(pe->e_msg) + 4;
if (trace)
tpacket("sent", tp, length);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ww.h,v 1.11 1997/12/31 06:55:16 thorpej Exp $ */
/* $NetBSD: ww.h,v 1.12 1998/07/26 15:28:20 mycroft Exp $ */
/*
* Copyright (c) 1983, 1993
@ -338,7 +338,8 @@ void wwdumpsmap __P((void));
void wwdumpwin __P((struct ww *));
void wwend __P((int));
int wwenviron __P((struct ww *));
char *wwerror __P((void));
const char *
wwerror __P((void));
void wwflush __P((void));
void wwframe __P((struct ww *, struct ww *));
void wwframec __P((struct ww *, int, int, char));

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwerror.c,v 1.4 1997/11/21 08:37:19 lukem Exp $ */
/* $NetBSD: wwerror.c,v 1.5 1998/07/26 15:28:20 mycroft Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwerror.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwerror.c,v 1.4 1997/11/21 08:37:19 lukem Exp $");
__RCSID("$NetBSD: wwerror.c,v 1.5 1998/07/26 15:28:20 mycroft Exp $");
#endif
#endif /* not lint */
@ -49,7 +49,7 @@ __RCSID("$NetBSD: wwerror.c,v 1.4 1997/11/21 08:37:19 lukem Exp $");
#include <string.h>
#include "ww.h"
char *
const char *
wwerror()
{
switch (wwerrno) {

View File

@ -1,8 +1,8 @@
/* $NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $ */
/* $NetBSD: report.c,v 1.4 1998/07/26 15:33:34 mycroft Exp $ */
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: report.c,v 1.3 1998/03/14 04:39:55 lukem Exp $");
__RCSID("$NetBSD: report.c,v 1.4 1998/07/26 15:33:34 mycroft Exp $");
#endif
/*
@ -140,7 +140,7 @@ report(priority, fmt, va_alist)
/*
* Return pointer to static string which gives full filesystem error message.
*/
char *
const char *
get_errmsg()
{
extern int errno;

View File

@ -1,4 +1,4 @@
/* $NetBSD: report.h,v 1.2 1998/01/09 08:09:15 perry Exp $ */
/* $NetBSD: report.h,v 1.3 1998/07/26 15:33:34 mycroft Exp $ */
/* report.h */
@ -10,6 +10,6 @@
extern void report_init P((int nolog));
extern void report P((int, char *, ...));
extern char *get_errmsg P((void));
extern const char *get_errmsg P((void));
#undef P