From 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 Mon Sep 17 00:00:00 2001 From: svn2git Date: Fri, 1 Jul 1994 00:00:00 -0800 Subject: Release FreeBSD 1.1.5.1 This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs. --- gnu/libexec/uucp/libuucp/buffer.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'gnu/libexec/uucp/libuucp/buffer.c') diff --git a/gnu/libexec/uucp/libuucp/buffer.c b/gnu/libexec/uucp/libuucp/buffer.c index c44fa4513942..8ddb2219cf4f 100644 --- a/gnu/libexec/uucp/libuucp/buffer.c +++ b/gnu/libexec/uucp/libuucp/buffer.c @@ -1,7 +1,7 @@ /* buffer.c Manipulate buffers used to hold strings. - Copyright (C) 1992 Ian Lance Taylor + Copyright (C) 1992, 1993 Ian Lance Taylor This file is part of Taylor UUCP. @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author of the program may be contacted at ian@airs.com or - c/o Infinity Development Systems, P.O. Box 520, Waltham, MA 02254. + c/o Cygnus Support, Building 200, 1 Kendall Square, Cambridge, MA 02139. */ #include "uucp.h" @@ -97,13 +97,31 @@ void ubuffree (z) char *z; { - size_t ioff; struct sbuf *q; + /* The type of ioff should be size_t, but making it int avoids a bug + in some versions of the HP/UX compiler, and will always work. */ + int ioff; if (z == NULL) return; ioff = offsetof (struct sbuf, u); q = (struct sbuf *) (pointer) (z - ioff); + +#ifdef DEBUG_BUFFER + { + struct sbuf *qlook; + + for (qlook = qBlist; qlook != NULL; qlook = qlook->qnext) + { + if (qlook == q) + { + ulog (LOG_ERROR, "ubuffree: Attempt to free buffer twice"); + abort (); + } + } + } +#endif + q->qnext = qBlist; qBlist = q; } -- cgit v1.2.3