sprinkle some _DIAGASSERT()s in
This commit is contained in:
parent
0ed2fcf9fb
commit
c9578df033
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: termcap.c,v 1.36 2000/06/03 07:14:55 blymn Exp $ */
|
||||
/* $NetBSD: termcap.c,v 1.37 2001/01/09 07:18:49 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)termcap.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: termcap.c,v 1.36 2000/06/03 07:14:55 blymn Exp $");
|
||||
__RCSID("$NetBSD: termcap.c,v 1.37 2001/01/09 07:18:49 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -84,6 +84,9 @@ t_setinfo(struct tinfo **bp, const char *entry)
|
|||
char capability[256], *cap_ptr;
|
||||
size_t limit;
|
||||
|
||||
_DIAGASSERT(bp != NULL);
|
||||
_DIAGASSERT(entry != NULL);
|
||||
|
||||
if ((*bp = malloc(sizeof(struct tinfo))) == NULL)
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tgoto.c,v 1.18 2000/12/13 22:14:40 scw Exp $ */
|
||||
/* $NetBSD: tgoto.c,v 1.19 2001/01/09 07:18:50 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -38,10 +38,11 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tgoto.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: tgoto.c,v 1.18 2000/12/13 22:14:40 scw Exp $");
|
||||
__RCSID("$NetBSD: tgoto.c,v 1.19 2001/01/09 07:18:50 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <termcap.h>
|
||||
|
@ -115,6 +116,7 @@ t_goto(info, CM, destcol, destline, buffer, limit)
|
|||
int which = destline;
|
||||
|
||||
/* CM is checked below */
|
||||
_DIAGASSERT(buffer != NULL);
|
||||
|
||||
if (info != NULL)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tputs.c,v 1.17 2001/01/05 23:02:00 christos Exp $ */
|
||||
/* $NetBSD: tputs.c,v 1.18 2001/01/09 07:18:50 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -38,7 +38,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)tputs.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: tputs.c,v 1.17 2001/01/05 23:02:00 christos Exp $");
|
||||
__RCSID("$NetBSD: tputs.c,v 1.18 2001/01/09 07:18:50 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -72,6 +72,9 @@ _tputs_convert(ptr, affcnt)
|
|||
{
|
||||
int i = 0;
|
||||
|
||||
_DIAGASSERT(ptr != NULL);
|
||||
_DIAGASSERT(*ptr != NULL);
|
||||
|
||||
/*
|
||||
* Convert the number representing the delay.
|
||||
*/
|
||||
|
@ -167,8 +170,12 @@ t_puts(info, cp, affcnt, outc, args)
|
|||
char pad[2], *pptr;
|
||||
char *pc;
|
||||
|
||||
if (info != NULL)
|
||||
{
|
||||
/* XXX: info may be NULL ? */
|
||||
/* cp is handled below */
|
||||
_DIAGASSERT(outc != NULL);
|
||||
_DIAGASSERT(args != NULL);
|
||||
|
||||
if (info != NULL) {
|
||||
/*
|
||||
* if we have info then get the pad char from the
|
||||
* termcap entry if it exists, otherwise use the
|
||||
|
|
Loading…
Reference in New Issue